
14 Jan
2010
14 Jan
'10
7:40 a.m.
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.