[project @ 1999-01-27 15:01:03 by simonpj]
[ghc-hetmet.git] / ghc / tests / deriving / should_compile / drv001.hs
1 -- !!! canonical weird example for "deriving"
2 module ShouldSucceed where
3
4 data X a b
5   = C1 (T a)
6   | C2 (Y b)
7   | C3 (X b a)
8   deriving (Read, Show)
9
10 data Y b
11   = D1
12   | D2 (X Int b)
13   deriving (Read, Show)
14
15 data T a
16   = E1
17
18 instance Eq a => Show (T a) where
19     showsPrec = error "show"
20 instance Eq a => Read (T a) where
21     readsPrec = error "read"