[commit: ghc] master: Respect Note [The tcType invariant] (3d25203)

git at git.haskell.org git at git.haskell.org
Mon Mar 5 08:51:14 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3d252037234ce48f9bdada7d5c9b1d8eba470829/ghc

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

commit 3d252037234ce48f9bdada7d5c9b1d8eba470829
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Mar 2 17:26:58 2018 +0000

    Respect Note [The tcType invariant]
    
    I tried to do this with
    
        commit 0a12d92a8f65d374f9317af2759af2b46267ad5c
        Author: Simon Peyton Jones <simonpj at microsoft.com>
        Date:   Wed Dec 13 12:53:26 2017 +0000
    
        Further improvements to well-kinded types
    
        The typechecker has the invariant that every type should be well-kinded
        as it stands, without zonking.  See Note [The well-kinded type invariant]
        in TcType.
    
        That invariant was not being upheld, which led to Trac #14174.  I fixed
        part of it, but T14174a showed that there was more.  This patch finishes
        the job.
    
    But I didn't get it quite right as Trac #14873 showed.
    
    This patch fixes the problem; although I am still a bit unhappy.
    (See "A worry" in the HsApp case of tc_infer_hs_type.)


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

3d252037234ce48f9bdada7d5c9b1d8eba470829
 compiler/typecheck/TcHsType.hs      | 59 ++++++++++++++++++++++++++++---------
 testsuite/tests/polykinds/T14873.hs | 49 ++++++++++++++++++++++++++++++
 testsuite/tests/polykinds/all.T     |  1 +
 3 files changed, 95 insertions(+), 14 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 3d252037234ce48f9bdada7d5c9b1d8eba470829


More information about the ghc-commits mailing list