On Jul 13, 2010, at 6:38 PM, Christian Maeder wrote:

I'm asking for support of:

http://hackage.haskell.org/trac/haskell-prime/wiki/PrefixMinusResolution

The wording in

    The operator to the left of prefix -, if there is one, is ignored.

is unfortunate. Said operator is not *ignored* in the sense that `a + - b` parses as `a - b`. It is just not considered for fixity resolution of the mentioned occurrence of prefix -. (It may be considered for fixity resolution in a different context.)

I don't have strong opinions on the content of the proposal, especially whether I prefer NegationBindsTightly or PrefixMinusResolution. (With the above sentence in mind, a funnier - and more specific - name would have been NegationBindsRightly :) </ aside>). The `- x^2` case is a good argument in favour of your proposal, but I'd want to also consider which one is easier to explain to the user and easier to implement (but I am lacking the required knowledge).

The discussion on "prefix operators" (currently on this list) may shed some light on simplicity.

Sebastian


--
Underestimating the novelty of the future is a time-honored tradition.
(D.G.)



_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to