diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile/drv001.hs')
-rw-r--r-- | testsuite/tests/deriving/should_compile/drv001.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/drv001.hs b/testsuite/tests/deriving/should_compile/drv001.hs new file mode 100644 index 0000000000..694af6a50f --- /dev/null +++ b/testsuite/tests/deriving/should_compile/drv001.hs @@ -0,0 +1,21 @@ +-- !!! canonical weird example for "deriving" +module ShouldSucceed where + +data X a b + = C1 (T a) + | C2 (Y b) + | C3 (X b a) + deriving (Read, Show) + +data Y b + = D1 + | D2 (X Int b) + deriving (Read, Show) + +data T a + = E1 + +instance Eq a => Show (T a) where + showsPrec = error "show" +instance Eq a => Read (T a) where + readsPrec = error "read" |