[project @ 1996-01-08 20:28:12 by partain]
[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 class Foo a where
6     op1 :: a -> Bool
7     op2 :: Ord b => a -> b -> b -> b
8
9     op1 x = True
10     op2 x y z = if (op1 x) && (y < z) then y else z
11
12 instance Foo Int where {}
13
14 instance Foo a => Foo [a] where {}