[commit: ghc] ghc-8.2: Fix scoping of data cons during kind checking (2fb2b60)

git at git.haskell.org git at git.haskell.org
Sun May 21 15:10:15 UTC 2017


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

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

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

commit 2fb2b60ebc6a649b8345bbb491a253972c973978
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri May 19 14:57:59 2017 +0100

    Fix scoping of data cons during kind checking
    
    Trac #13625 pointed out that in
    
       data X :: Y where Y :: X
    
    we need 'Y' to be in scope (as APromotionErr) when dealing with
    X's kind signature.  Previously we got a crash.
    
    This patch simplifies the code as well as making it work.
    
    (cherry picked from commit 2501fb70691f80b9c48e5f9bdea3b897653f499a)


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

2fb2b60ebc6a649b8345bbb491a253972c973978
 compiler/typecheck/TcEnv.hs             |  24 ++++--
 compiler/typecheck/TcRnTypes.hs         |   4 +-
 compiler/typecheck/TcTyClsDecls.hs      | 143 ++++++++++++++++++--------------
 testsuite/tests/polykinds/T13625.hs     |   5 ++
 testsuite/tests/polykinds/T13625.stderr |   5 ++
 testsuite/tests/polykinds/all.T         |   1 +
 6 files changed, 109 insertions(+), 73 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 2fb2b60ebc6a649b8345bbb491a253972c973978


More information about the ghc-commits mailing list