summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/drv002.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/deriving/should_compile/drv002.hs')
-rw-r--r--testsuite/tests/deriving/should_compile/drv002.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/drv002.hs b/testsuite/tests/deriving/should_compile/drv002.hs
new file mode 100644
index 0000000000..15eb2d9ecc
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/drv002.hs
@@ -0,0 +1,14 @@
+module ShouldSucceed where
+
+data Z a b
+ = C1 (T a)
+ | C2 (Z [a] [b])
+ deriving (Show, Read)
+
+data T a
+ = E1
+
+instance Eq a => Show (T a) where
+ showsPrec = error "show"
+instance Eq a => Read (T a) where
+ readsPrec = error "read"