[project @ 2001-06-29 13:53:55 by simonmar]
[ghc-hetmet.git] / ghc / tests / rename / should_fail / rnfail017.hs
1 module ShouldFail where
2
3 -- !!! Precedence of unary negation
4
5 f1 x y = x + -y         -- Fails
6 f2 x y = x * -y         -- Fails
7
8
9 f3 x y = -x + y         -- OK: means  (-x) + y
10                         -- since - is left associative
11
12 f4 x y = - x*y          -- OK: means -(x*y)
13                         -- since - binds less tightly than *
14
15 f5 x y = x >= -y        -- OK means x >= (-y)
16
17