[project @ 1997-07-26 22:48:58 by sof]
[ghc.git] / ghc / tests / typecheck / should_compile / 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