1 module ShouldFail where
3 -- !!! Precedence of unary negation
5 f1 x y = x + -y -- Fails
6 f2 x y = x * -y -- Fails
9 f3 x y = -x + y -- OK: means (-x) + y
10 -- since - is left associative
12 f4 x y = - x*y -- OK: means -(x*y)
13 -- since - binds less tightly than *
15 f5 x y = x >= -y -- OK means x >= (-y)