diff options
| -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, ['']) |
