prefix minus and infix resolution
sebf at informatik.uni-kiel.de
Tue Jul 13 16:19:22 EDT 2010
On Jul 13, 2010, at 6:38 PM, Christian Maeder wrote:
> I'm asking for support of:
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
The discussion on "prefix operators" (currently on this list) may shed
some light on simplicity.
Underestimating the novelty of the future is a time-honored tradition.
More information about the Haskell-prime