Negation

Simon Peyton-Jones simonpj at microsoft.com
Tue Feb 9 02:30:29 EST 2010


| Of course unary minus should bind tighter than any infix operator.
| I remember suggesting this when the language was designed, but the
| Haskell committee was very set against it (mostly Joe Fasel I think).
| 
| I think it's too late to change that now, it could really introduce
| some subtle bugs with no parse or type errors.

I'm not sure it's too late to change.   That's what Haskell Prime is for.  The change would have a flag of course, and could emit a warning if the old and new would give different results.

I think I'll create a ticket at least.

| I imagine it would be something like deleting the production
| 
|     lexp6    ->      - exp7
| 
| and adding the production
| 
|     exp10    ->      - fexp

Yes, exactly

Simon


More information about the Haskell-prime mailing list