H98: specialids and specialops
Thu, 4 Oct 2001 01:08:03 -0700
George Russell and Wolfram Karl have both noticed that=20
'specialid' and 'specialop' are defined in the H98 syntax, but
never used. Having looked at it, I propose to
1. Remove all references to 'specialid' and 'specialop'
2. Instead, add the following paragraph to 5.3 (Import declarations)
"Lexically speaking, the terminal symbols ``as'', ``qualified'' and
``hiding'' are each a varid rather than a reservedid. They have
special significance only in the context of an import declaration;
in other contexts they may be used as variables."
3. Similarly, add the following paragraph to 4.2.1 (Strictness fields)
"Lexically, ``!'' is an ordinary varsym not a reservedop; it has special
only in the context of the argument types of a data declaration."
The only other special-op (unary minus) is dealt with at length already.
Any objections? I don't think this is controversial.
| -----Original Message-----
| From: George Russell [mailto:email@example.com]=20
| Sent: 02 October 2001 18:28
| To: Simon Peyton-Jones
| Subject: Yet more lexing pedantry
| Dear Simon Peyton Jones,
| Again not a bug, but specialids appear rather orphaned. That=20
| is, they are defined, but do not appear in any production, so=20
| they cannot be used. One presumes that when "as",=20
| "qualified" and "hiding" appear later they are magically to=20
| be regarded as specialids rather than varids (which they=20
| could also be), but this is nowhere specified and does not=20
| seem particularly necessary. Rather than regarding "as" as a=20
| specialid that happens to be "id", would it not simply be=20
| better to regard it as a varid that happens to be "as"?
| Best wishes,
| George Russell