[commit: ghc] master: Fix #12709 by not building bad applications (dca44ad)
git at git.haskell.org
git at git.haskell.org
Fri Mar 17 15:24:09 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/dca44adb9e14992e0aed49cdfd4b2baa2182073b/ghc
>---------------------------------------------------------------
commit dca44adb9e14992e0aed49cdfd4b2baa2182073b
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date: Thu Mar 16 10:34:29 2017 -0400
Fix #12709 by not building bad applications
In an effort to report multiple levity polymorphism errors all at
once, the desugarer does not fail when encountering bad levity
polymorphism. But we must be careful not to build the bad applications,
lest they try to satisfy the let/app invariant and call
isUnliftedType on a levity polymorphic type. This protects calls
to mkCoreAppDs appropriately.
test case: typecheck/should_fail/T12709
>---------------------------------------------------------------
dca44adb9e14992e0aed49cdfd4b2baa2182073b
compiler/coreSyn/MkCore.hs | 5 +++-
compiler/deSugar/DsBinds.hs | 6 +++--
compiler/deSugar/DsExpr.hs | 24 +++++++++++-------
compiler/deSugar/DsMonad.hs | 20 ++++++++++++---
compiler/deSugar/DsUtils.hs | 2 ++
testsuite/tests/typecheck/should_fail/T12709.hs | 29 ++++++++++++++++++++++
.../tests/typecheck/should_fail/T12709.stderr | 24 ++++++++++++++++++
testsuite/tests/typecheck/should_fail/all.T | 1 +
8 files changed, 96 insertions(+), 15 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc dca44adb9e14992e0aed49cdfd4b2baa2182073b
More information about the ghc-commits
mailing list