Merge branch 'master' into atomics
[ghc.git] / testsuite / tests / simplCore / should_compile / rule1.hs
1
2 -- This one triggers the bug reported in Trac #1092
3 -- The problem is that the rule
4 -- forall w. f (\v->w) = w
5 -- erroneously matches the call
6 -- f id
7 --
8 -- Lint catches the error
9
10 module Foo where
11
12 f :: (Int -> Int) -> Int
13 {-# NOINLINE f #-}
14 f g = g 4
15 {-# RULES
16 "f" forall w. f (\v->w) = w
17 #-}
18
19 h = f id