unary minus

Christian Maeder maeder@tzi.de
Thu, 04 Sep 2003 21:17:26 +0200


Hi,

I wonder why Haskell only allows the unary minus on the left side of an 
expression ("lexp" in the grammar).

There should be no problem to uniquely recognize an unary minus right 
beside an operation symbol ("qop"). Does the grammar allow two 
consecutive qops in other cases?

This would allow "1 * - 1" to be correct (which I think is sort of 
"standard"), while "1 - 1" clearly is the infix minus.

What was the rational for the current restriction of the unary minus? Do 
I oversee something?

Christian