1422d8966404aa8d913878b9f52e543caefe8d5f
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc110.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 module ShouldCompile where
4
5 -- A stripped down functional-dependency 
6 -- example that causes GHC 4.08.1 to crash with:
7 -- "basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar"
8 -- Reported by Thomas Hallgren Nov 00
9
10
11 primDup :: Int -> IO Int
12 primDup = undefined
13
14 dup () = call primDup
15
16 class Call    c h | c -> h where
17     call  :: c -> h
18
19 instance Call c h => Call (Int->c) (Int->h) where 
20     call f = call . f
21
22