diff options
author | Richard Eisenberg <eir@cis.upenn.edu> | 2016-12-17 18:06:34 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-12-17 18:09:37 -0500 |
commit | 8906e7b79a585039712034d9e88ca49f3cea6554 (patch) | |
tree | 7bd338f776d0e08437fd0495ebf0eee098fd54ed /testsuite/tests/patsyn/should_fail/all.T | |
parent | 6c816c56c674221173e725b5718c8052dda0c8f4 (diff) | |
download | haskell-8906e7b79a585039712034d9e88ca49f3cea6554.tar.gz |
Reshuffle levity polymorphism checks.
Previously, GHC checked for bad levity polymorphism to the left of all
arrows in data constructors. This was wrong, as reported in #12911
(where an example is also shown). The solution is to check each
individual argument for bad levity polymorphism. Thus the check has
been moved from TcValidity to TcTyClsDecls.
A similar situation exists with pattern synonyms, also fixed here.
This patch also nabs #12819 while I was in town.
Test cases: typecheck/should_compile/T12911, patsyn/should_fail/T12819
Test Plan: ./validate
Reviewers: simonpj, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2783
GHC Trac Issues: #12819, #12911
Diffstat (limited to 'testsuite/tests/patsyn/should_fail/all.T')
-rw-r--r-- | testsuite/tests/patsyn/should_fail/all.T | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/patsyn/should_fail/all.T b/testsuite/tests/patsyn/should_fail/all.T index fe0922c882..cb23b3fb2a 100644 --- a/testsuite/tests/patsyn/should_fail/all.T +++ b/testsuite/tests/patsyn/should_fail/all.T @@ -32,3 +32,4 @@ test('T10426', normal, compile_fail, ['']) test('T11265', normal, compile_fail, ['']) test('T11667', normal, compile_fail, ['']) test('T12165', normal, compile_fail, ['']) +test('T12819', normal, compile_fail, ['']) |