[commit: ghc] master: Quantify class variables first in associated families' kinds (a57fa24)

git at git.haskell.org git at git.haskell.org
Mon Oct 1 16:48:58 UTC 2018


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

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

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

commit a57fa24746421c0e13d0c09b72cbabea3622779f
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Mon Oct 1 12:05:12 2018 -0400

    Quantify class variables first in associated families' kinds
    
    Summary:
    Previously, `kcLHsQTyVars` would always quantify class-bound
    variables invisibly in the kinds of associated types, resulting in
    #15591. We counteract this by explicitly passing the class-bound
    variables to `kcLHsQTyVars` and quantifying over the ones that are
    mentioned in the associated type such that (1) they are specified,
    and (2) they come before other kind variables.
    See `Note [Kind variable ordering for associated types]`.
    
    Test Plan: make test TEST=T15591
    
    Reviewers: goldfire, simonpj, bgamari
    
    Reviewed By: simonpj
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15591
    
    Differential Revision: https://phabricator.haskell.org/D5159


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

a57fa24746421c0e13d0c09b72cbabea3622779f
 compiler/typecheck/TcHsType.hs             | 82 ++++++++++++++++++++++++++----
 compiler/typecheck/TcTyClsDecls.hs         | 57 +++++++++++++--------
 docs/users_guide/glasgow_exts.rst          | 12 +++++
 testsuite/tests/ghci/scripts/T15591.hs     | 10 ++++
 testsuite/tests/ghci/scripts/T15591.script |  4 ++
 testsuite/tests/ghci/scripts/T15591.stdout |  2 +
 testsuite/tests/ghci/scripts/all.T         |  1 +
 7 files changed, 138 insertions(+), 30 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 a57fa24746421c0e13d0c09b72cbabea3622779f


More information about the ghc-commits mailing list