projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git]
/
ghc
/
compiler
/
tests
/
typecheck
/
should_succeed
/
tc059.hs
1
module ShouldSucceed where
2
3
class Eq2 a where
4
deq :: a -> a -> Bool
5
foo :: a -> a
6
7
instance Eq2 Int where
8
deq x y = True
9
foo x = x
10
11
instance (Eq2 a) => Eq2 [a] where
12
deq (a:as) (b:bs) = if (deq a (foo b)) then (deq as (foo bs)) else False
13
foo x = x
14
15
f x = deq x [1]