Second draft of the Haskell 2010 report available
Christian Maeder
Christian.Maeder at dfki.de
Wed Jul 7 11:56:50 EDT 2010
Simon Marlow schrieb:
> prefix negation should move to lexp to
> be consistent with lpat
prefix negation should not move to lexp, because this would rule out
"- 1 ^ 2" as negated infix expression "- (1 ^ 2)", whereas a negated
infix pattern is impossible. Unary minus is no constructor and cannot be
defined. The latter should be (or is already?) mentioned somewhere.
You could move prefix negation to lexp, if you allow the fixity
resolution to construct negated infix expression that are not covered by
the grammar (as currently happens anyway).
Moving prefix negation from lpat to pat to be consistent with infixexp
would be overkill, though.
Christian
More information about the Haskell-prime
mailing list