83fffd1bf67599de56b17adbffc120278f681b14
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc111.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 -- !!! Test monomorphism + RULES
4
5 module ShouldCompile where
6
7 -- This example crashed GHC 4.08.1.
8 -- The reason was that foobar is monomorphic, so the RULE 
9 -- should not generalise over it.
10
11 foo 1 = 2
12 bar 0 = 1
13
14 foobar = 2
15
16 {-# RULES
17   "foo/bar" foo bar = foobar
18  #-}
19
20