[project @ 1997-07-26 22:48:58 by sof]
[ghc.git] / ghc / tests / typecheck / should_compile / tc058.hs
1 module ShouldSucceed where
2
3 class Eq2 a where
4 doubleeq :: a -> a -> Bool
5
6 class (Eq2 a) => Ord2 a where
7 lt :: a -> a -> Bool
8
9 instance Eq2 Int where
10 doubleeq x y = True
11
12 instance Ord2 Int where
13 lt x y = True
14
15 instance (Eq2 a,Ord2 a) => Eq2 [a] where
16 doubleeq xs ys = True
17
18 f x y = doubleeq x [1]