projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1997-07-30 23:52:45 by sof]
[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])