summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/all.T
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-12-20 23:00:21 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2018-12-20 23:00:21 -0500
commit28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7 (patch)
tree6b67b7d02b2b69edd650c74a7f69e6c1281da80a /testsuite/tests/rename/should_fail/all.T
parent5f2a8793514918eaa670347ce0d95dfdbbdd4f4d (diff)
downloadhaskell-28f41f1a7a0ebae7b50ca41dbf78c04ee5b8b5b7.tar.gz
Fix #16002 by moving a validity check to the renamer
Summary: The validity check which rejected things like: ```lang=haskell type family B x where A x = x ``` Used to live in the typechecker. But it turns out that this validity check was //only// being run on closed type families without CUSKs! This meant that GHC would silently accept something like this: ```lang=haskell type family B (x :: *) :: * where A x = x ``` This patch fixes the issue by moving this validity check to the renamer, where we can be sure that the check will //always// be run. Test Plan: make test TEST=T16002 Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: goldfire, rwbarton, carter GHC Trac Issues: #16002 Differential Revision: https://phabricator.haskell.org/D5420
Diffstat (limited to 'testsuite/tests/rename/should_fail/all.T')
-rw-r--r--testsuite/tests/rename/should_fail/all.T1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T
index ba6975483a..56934266d2 100644
--- a/testsuite/tests/rename/should_fail/all.T
+++ b/testsuite/tests/rename/should_fail/all.T
@@ -142,5 +142,6 @@ test('T15607', normal, compile_fail, [''])
test('T15611a', normal, compile_fail, [''])
test('T15611b', normal, ghci_script, ['T15611b.script'])
test('T15828', normal, compile_fail, [''])
+test('T16002', normal, compile_fail, [''])
test('ExplicitForAllRules2', normal, compile_fail, [''])