[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / compiler / tests / typecheck / should_succeed / tc057.hs
1 module ShouldSucceed where
2
3 -- See also tcfail060.hs
4
5 class Eq' a where
6  deq :: a -> a -> Bool
7
8 instance Eq' Int where
9   deq x y = True
10
11 instance (Eq' a) => Eq' [a] where
12    deq (a:as) (b:bs) = dand (f a b) (f as bs)
13
14 dand True True = True
15 dand x y = False
16
17 f :: Eq' a => a -> a -> Bool
18 f p q = dand (deq p q) (deq [1::Int] [2::Int])