diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2016-06-22 22:28:55 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2016-06-22 22:28:55 +0100 |
commit | 210a2e122ce3b7c56c780e4541b9f222abe7d2f7 (patch) | |
tree | dee7f6a26d31ae01fa77909b6828a7ba8fcf20bd | |
parent | ce97b7298d54bdfccd9dcf366a69c5617b4eb43f (diff) | |
download | haskell-210a2e122ce3b7c56c780e4541b9f222abe7d2f7.tar.gz |
Test Trac #12163
-rw-r--r-- | testsuite/tests/deriving/should_fail/T12163.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_fail/T12163.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/deriving/should_fail/all.T | 2 |
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, ['']) |