summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-06-22 22:28:55 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2016-06-22 22:28:55 +0100
commit210a2e122ce3b7c56c780e4541b9f222abe7d2f7 (patch)
treedee7f6a26d31ae01fa77909b6828a7ba8fcf20bd
parentce97b7298d54bdfccd9dcf366a69c5617b4eb43f (diff)
downloadhaskell-210a2e122ce3b7c56c780e4541b9f222abe7d2f7.tar.gz
Test Trac #12163
-rw-r--r--testsuite/tests/deriving/should_fail/T12163.hs8
-rw-r--r--testsuite/tests/deriving/should_fail/T12163.stderr6
-rw-r--r--testsuite/tests/deriving/should_fail/all.T2
3 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/tests/deriving/should_fail/T12163.hs b/testsuite/tests/deriving/should_fail/T12163.hs
new file mode 100644
index 0000000000..862fdd0944
--- /dev/null
+++ b/testsuite/tests/deriving/should_fail/T12163.hs
@@ -0,0 +1,8 @@
+ {-# LANGUAGE DeriveFunctor #-}
+ {-# LANGUAGE GADTs #-}
+
+module T12163 where
+
+data T a b where
+ Mk :: Int -> b -> T Int b
+ deriving (Functor)
diff --git a/testsuite/tests/deriving/should_fail/T12163.stderr b/testsuite/tests/deriving/should_fail/T12163.stderr
new file mode 100644
index 0000000000..708a1b0990
--- /dev/null
+++ b/testsuite/tests/deriving/should_fail/T12163.stderr
@@ -0,0 +1,6 @@
+
+T12163.hs:8:16: error:
+ • Can't make a derived instance of ‘Functor (T a)’:
+ Constructor ‘Mk’ is a GADT
+ Possible fix: use a standalone deriving declaration instead
+ • In the data declaration for ‘T’
diff --git a/testsuite/tests/deriving/should_fail/all.T b/testsuite/tests/deriving/should_fail/all.T
index e0c6e62bff..bcb410b6ef 100644
--- a/testsuite/tests/deriving/should_fail/all.T
+++ b/testsuite/tests/deriving/should_fail/all.T
@@ -58,4 +58,4 @@ test('T9687', normal, compile_fail, [''])
test('T8984', normal, compile_fail, [''])
test('T9968a', normal, compile_fail, [''])
-
+test('T12163', normal, compile_fail, [''])