summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_compile/tc062.hs
blob: fde6c4b1dae5af7e595e0513ebf09515e2622619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module ShouldSucceed where

class Eq1 a where
 deq :: a -> a -> Bool

instance Eq1 Int where
 deq x y = True

instance (Eq1 a) => Eq1 [a] where
 deq (a:as) (b:bs) = if (deq a b) then (deq as bs) else False

f x (y:ys) = deq x ys