[commit: ghc] master: Test Trac #12163 (210a2e1)

git at git.haskell.org git at git.haskell.org
Wed Jun 22 21:25:26 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/210a2e122ce3b7c56c780e4541b9f222abe7d2f7/ghc

>---------------------------------------------------------------

commit 210a2e122ce3b7c56c780e4541b9f222abe7d2f7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Jun 22 22:28:55 2016 +0100

    Test Trac #12163


>---------------------------------------------------------------

210a2e122ce3b7c56c780e4541b9f222abe7d2f7
 testsuite/tests/deriving/should_fail/T12163.hs     | 8 ++++++++
 testsuite/tests/deriving/should_fail/T12163.stderr | 6 ++++++
 testsuite/tests/deriving/should_fail/all.T         | 2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/testsuite/tests/deriving/should_fail/T12163.hs b/testsuite/tests/deriving/should_fail/T12163.hs
new file mode 100644
index 0000000..862fdd0
--- /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 0000000..708a1b0
--- /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 e0c6e62..bcb410b 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, [''])



More information about the ghc-commits mailing list