[Haskell-cafe] Language simplicity

Martijn van Steenbergen martijn at van.steenbergen.nl
Thu Jan 14 07:40:50 EST 2010


Niklas Broberg wrote:
>> Haskell '98 apparently features 25 reserved words. (Not counting "forall"
>> and "mdo" and so on, which AFAIK are not in Haskell '98.)
> 
> 21 actually. case, class, data, default, deriving, do, else, if,
> import, in, infix, infixl, infixr, instance, let, module, newtype, of,
> then, type, where. There's also three special words that can still be
> used as identifiers, so aren't reserved: as, qualified, hiding.

Since you can define operators in Haskell, would it make sense to 
include '=', '--', ':', ',' etc. as "reserved names" since those can't 
be used as operator names?

> Illegal binding of built-in syntax: :
> Illegal binding of built-in syntax: (,)
> parse error (possibly incorrect indentation)

Martijn.


More information about the Haskell-Cafe mailing list