
7 Jul
2010
7 Jul
'10
11:56 a.m.
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