db07ad13254ee3a5034ba495fad0b07a4c1710b9
[ghc-hetmet.git] / ghc / tests / typecheck / should_compile / 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 ShouldSucceed 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 {}