d66cd34cf765cd1ba87015f1177cf9635ba02d5a
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / tc117.hs
1 {-# OPTIONS -fglasgow-exts #-}
2
3 -- !!! Functional dependencies
4 -- This one gave another fail in tcReadMutVar
5
6 module M1 where
7
8 class HasFoo a foo | a -> foo where
9     foo :: a -> foo
10 instance HasFoo Int Int where
11     foo = id
12
13 instance HasFoo a b => HasFoo [a] b where
14     foo = foo . head
15
16 test:: [[Int]] -> Int
17 test = foo