summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2014-09-12 17:44:12 +0100
committerJose Pedro Magalhaes <jpm@cs.ox.ac.uk>2014-09-12 17:44:12 +0100
commit946cbcefab9bc02e12b741e5b070d7521b37ba1a (patch)
tree341849a324dd80cfddbfc938569d13b2d1f4c4b2 /testsuite/tests
parent695d15d0ab7dd11620a70d15f1720713f35b6e3c (diff)
downloadhaskell-946cbcefab9bc02e12b741e5b070d7521b37ba1a.tar.gz
Fix support for deriving Generic1 for data families (FIX #9563)
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/generics/T9563.hs18
-rw-r--r--testsuite/tests/generics/all.T1
2 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/generics/T9563.hs b/testsuite/tests/generics/T9563.hs
new file mode 100644
index 0000000000..fd128658e9
--- /dev/null
+++ b/testsuite/tests/generics/T9563.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE StandaloneDeriving #-}
+
+module T9563 where
+
+import GHC.Generics
+
+data family F typ :: * -> *
+data A
+data instance F A a = AData a
+ deriving (Generic, Generic1)
+
+data family G a b c d
+data instance G Int b Float d = H deriving Generic
+
+deriving instance Generic1 (G Int b Float)
diff --git a/testsuite/tests/generics/all.T b/testsuite/tests/generics/all.T
index 1231c61b34..df95fa604f 100644
--- a/testsuite/tests/generics/all.T
+++ b/testsuite/tests/generics/all.T
@@ -32,3 +32,4 @@ test('T7878', extra_clean(['T7878A.o' ,'T7878A.hi'
test('T8468', normal, compile_fail, [''])
test('T8479', normal, compile, [''])
+test('T9563', normal, compile, [''])