diff options
author | Richard Eisenberg <rae@richarde.dev> | 2019-12-11 15:58:56 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-12 21:29:27 -0500 |
commit | 350e2b78788d47255d27489dfc62d664498b5de4 (patch) | |
tree | 50f2f1982c9f120e6b8aac1970579d34333cd16a /testsuite/tests/patsyn | |
parent | 9129210f7e9937c1065330295f06524661575839 (diff) | |
download | haskell-350e2b78788d47255d27489dfc62d664498b5de4.tar.gz |
Don't zap to Any; error instead
This changes GHC's treatment of so-called Naughty Quantification
Candidates to issue errors, instead of zapping to Any.
Close #16775.
No new test cases, because existing ones cover this well.
Diffstat (limited to 'testsuite/tests/patsyn')
-rw-r--r-- | testsuite/tests/patsyn/should_compile/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T14552.hs (renamed from testsuite/tests/patsyn/should_compile/T14552.hs) | 0 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/T14552.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/patsyn/should_fail/all.T | 1 |
4 files changed, 9 insertions, 1 deletions
diff --git a/testsuite/tests/patsyn/should_compile/all.T b/testsuite/tests/patsyn/should_compile/all.T index 2ac343f635..6ef1928768 100644 --- a/testsuite/tests/patsyn/should_compile/all.T +++ b/testsuite/tests/patsyn/should_compile/all.T @@ -75,7 +75,6 @@ test('T14058', [extra_files(['T14058.hs', 'T14058a.hs'])], multimod_compile, ['T14058', '-v0']) test('T14326', normal, compile, ['']) test('T14394', normal, ghci_script, ['T14394.script']) -test('T14552', normal, compile, ['']) test('T14498', normal, compile, ['']) test('T16682', [extra_files(['T16682.hs', 'T16682a.hs'])], multimod_compile, ['T16682', '-v0 -fwarn-incomplete-patterns -fno-code']) diff --git a/testsuite/tests/patsyn/should_compile/T14552.hs b/testsuite/tests/patsyn/should_fail/T14552.hs index a4a7493530..a4a7493530 100644 --- a/testsuite/tests/patsyn/should_compile/T14552.hs +++ b/testsuite/tests/patsyn/should_fail/T14552.hs diff --git a/testsuite/tests/patsyn/should_fail/T14552.stderr b/testsuite/tests/patsyn/should_fail/T14552.stderr new file mode 100644 index 0000000000..b9b6b8448b --- /dev/null +++ b/testsuite/tests/patsyn/should_fail/T14552.stderr @@ -0,0 +1,8 @@ + +T14552.hs:22:9: error: + • Cannot generalise type; skolem ‘k’ would escape its scope + if I tried to quantify (aa0 :: k) in this type: + forall k (w :: k --> *). Exp a0 (F @k @(*) w aa0) + (Indeed, I sometimes struggle even printing this correctly, + due to its ill-scoped nature.) + • In the declaration for pattern synonym ‘FOO’ diff --git a/testsuite/tests/patsyn/should_fail/all.T b/testsuite/tests/patsyn/should_fail/all.T index 27ebc8bdd4..02cc2cec2c 100644 --- a/testsuite/tests/patsyn/should_fail/all.T +++ b/testsuite/tests/patsyn/should_fail/all.T @@ -46,3 +46,4 @@ test('T15685', normal, compile_fail, ['']) test('T15692', normal, compile, ['']) # It has -fdefer-type-errors inside test('T15694', normal, compile_fail, ['']) test('T16900', normal, compile_fail, ['-fdiagnostics-show-caret']) +test('T14552', normal, compile_fail, ['']) |