
On 12 Jan 2010, at 22:22, Andrew Coppin wrote:
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.
OK. Well the list I saw was for Haskell plus extensions, and I visually filtered out the inapplicable stuff. Apparently I missed something.
Also, the number varies depending on whether you consider "reversed words" or "keywords",
Aye, there's a subtle distinction between keywords and reserved words, but I think for the purposes of this discussion, they're the same thing. Martin