projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
01f2d872e6ccd2a092d4a96af82d857d72da8b02
[ghc-hetmet.git]
/
ghc
/
compiler
/
tests
/
typecheck
/
should_succeed
/
tc068.hs
1
module ShouldSucc where
2
3
data T a = D (B a) | C
4
data B b = X | Y b
5
6
instance (Eq a) => Eq (T a) where
7
(D x) == (D y) = x == y
8
C == C = True
9
a == b = False
10
11
a /= b = not (a == b)
12
13
instance (Eq b) => Eq (B b) where
14
X == X = True
15
(Y a) == (Y b) = a == b
16
a == b = False
17
18
a /= b = not (a == b)