projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
cc561b95b88e5734dc2821ce3f9185dd64e9f0eb
[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])