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 /compiler/utils/StringBuffer.hs | |
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 'compiler/utils/StringBuffer.hs')
0 files changed, 0 insertions, 0 deletions