Re: Cognitive dissonance in the Haskell Report

[email protected] Sat, 08 Nov 2025 02:11:51 -0000
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <176256791145.1759186.14111258027339101364@localhost>
Hehe, that language has just been copied forward from the 1998 Report, (and nobody's demurred in a quarter of a century AFAIK), so I think that horse has bolted.

Interestingly, the 1992 Report (search for Version 1.2) doesn't use that language.

I think 2.4's "ordinary identifier" is talking about the lexeme's semantic role: it identifies a function. (As distinct from a constructor, that can appear in a pattern match.) Elsewhere "ordinary operator" denotes its syntactic role.

3.2 continues after the bit you quote:

    Dually, an operator symbol can be converted to an ordinary identifier by enclosing it in parentheses.

But substituting (+) as an allegedly "ordinary identifier" into the para above would suggest (to those of an over-literal mind) that `(+)` should yield what is syntactically an operator again. Instead it gives syntax error.

"ordinary" appears throughout the Report prefixed to all sorts of terms. I don't think you should take "ordinary identifier" as having a special technical sense. Note it doesn't appear anywhere in italics as a formal definiendum.

And since taking the report over-literally will lead you quickly to a syntax error, I think GHC doesn't need engage a lawyer.

AntC
_______________________________________________
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.