Prefix negation

Rijk-Jan van Haaften rjchaaft@cs.uu.nl
Wed, 29 Aug 2001 16:34:52 +0200


Section 3.4 (Expressions.Operator applications) of
the language report, says this about prefix negation:

Prefix negation has the same precedence as the infix
operator - defined in the Prelude (see Table 1).

This is not what I expected (and not what other languages
mostly do). One of the consequences is that

-3 ^ 2 = -9

In most programming languages as well as in mathematics
it is quite unusual to have infix operators with a higher
priority than prefix operators.

Why is this rule chosen in Haskell?

Thanks in advance,

Rijk-Jan