Cognitive dissonance in the Haskell Report

Douglas McIlroy <[email protected]> Thu, 6 Nov 2025 11:27:28 -0500
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <CAKH6PiWtOspmT_6_vN5Lrh=e9tBgMuUPCp_1gkssON_vhSusXQ@mail.gmail.com>
Section 2.4 of the Haskell report defines "identifier" as a
lexeme that begins with a letter. A few paragraphs on it says

     An operator symbol starting with any other character
    [than :] is an ordinary identifier.

In everyday usage, ordinary people are necessarily people,
yet  this kind of ordinary identifier falls outside the
definition of identifier.

Section 3.2 says

     An operator is either an operator symbol, such as + or $$,
    or is an ordinary identifier enclosed in grave accents.

If "either" is taken in the exclusive sense, this implies that
operator symbols are *not* ordinary identifiers, in
contradiction to Section 2.4.

But if either is taken inclusively, then the lexeme +, an
ordinary identifier per Section 2.4, can optionally be
enclosed in grave accents.

The terminology needs some cleaning.

Doug McIlroy
_______________________________________________
Haskell-Cafe mailing list -- [email protected]
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.