d49f4ce43a6bca853b49e36775cecf28173af78a
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_succeed / tc079.hs
1 --!!! small class decl with local polymorphism;
2 --!!! "easy" to check default methods and such...
3 --!!! (this is the example given in TcClassDcl)
4 --
5 module Test where
6
7 class Foo a where
8     op1 :: a -> Bool
9     op2 :: Ord b => a -> b -> b -> b
10
11     op1 x = True
12     op2 x y z = if (op1 x) && (y < z) then y else z
13
14 instance Foo Int where {}
15
16 instance Foo a => Foo [a] where {}