operators ~ and @
Christian Maeder
Christian.Maeder at dfki.de
Thu Jul 15 10:50:07 EDT 2010
Hi,
the language description contains ~ and @ as reserved:
reservedop → .. | : | :: | = | \ | | | <- | -> | @ | ~ | =>
These "operators" are only used within patterns.
I see no reason to leave them user-definable and usable within expressions.
The only change in the grammar would be, to disallow them as
infix varop in funlhs:
funlhs → var apat { apat }
| pat varop⟨@|~⟩ pat
...
They could be defined as (@) and (~).
A similar restriction exists for the unary minus in right sections.
Once the bang "!" moves into patterns it would be just a further
symbol among ⟨@|~⟩.
Is this worth creating a proper proposal?
http://hackage.haskell.org/trac/haskell-prime/wiki/Process
It is not that I recommend defining (@) or (~) as operators (although
maybe useful in a few domains), it's just to make the language more
orthogonal wrt "!" that is already used in types and will be possibly
even more so via bang patterns.
("!" is currently not reserved and used in libraries as operator)
Cheers Christian
More information about the Haskell-prime
mailing list