[project @ 1996-01-08 20:28:12 by partain]
[ghc.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)