[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_succeed / tc043.hs
1 module ShouldSucceed where
2
3 --!!! another simple test of class and instance code.
4
5 class A a where
6  op1 :: a
7
8 instance A Int where
9  op1 = 2
10
11 f x = op1
12
13 class B b where
14  op2 :: b -> Int
15
16 instance (B a) => B [a] where
17  op2 [] = 0
18  op2 (x:xs) = 1 + op2 xs