[commit: ghc] ghc-8.2: Fix #12709 by not building bad applications (ae6e63a)

git at git.haskell.org git at git.haskell.org
Tue Mar 21 14:52:18 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/ae6e63aa858d663952b67cc9969fd14782d307bb/ghc

>---------------------------------------------------------------

commit ae6e63aa858d663952b67cc9969fd14782d307bb
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
    
    (cherry picked from commit dca44adb9e14992e0aed49cdfd4b2baa2182073b)


>---------------------------------------------------------------

ae6e63aa858d663952b67cc9969fd14782d307bb
 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 ae6e63aa858d663952b67cc9969fd14782d307bb


More information about the ghc-commits mailing list