[commit: ghc] master: Fix #16391 by using occCheckExpand in TcValidity (068b7e9)

git at git.haskell.org git at git.haskell.org
Fri Mar 8 01:45:49 UTC 2019


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

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

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

commit 068b7e983f4a0b35f453aa5e609998efd0c3f334
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Wed Mar 6 14:42:02 2019 -0500

    Fix #16391 by using occCheckExpand in TcValidity
    
    The type-variables-escaping-their-scope-via-kinds check in
    `TcValidity` was failing to properly expand type synonyms, which led
    to #16391. This is easily fixed by using `occCheckExpand` before
    performing the validity check.
    
    Along the way, I refactored this check out into its own function,
    and sprinkled references to Notes to better explain all of the moving
    parts. Many thanks to @simonpj for the suggestions.
    
    Bumps the haddock submodule.


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

068b7e983f4a0b35f453aa5e609998efd0c3f334
 compiler/basicTypes/OccName.hs                     |  2 +-
 compiler/typecheck/TcValidity.hs                   | 68 ++++++++++++++++------
 compiler/types/TyCoRep.hs                          |  6 +-
 compiler/types/Type.hs                             | 38 ++++++++++--
 .../tests/dependent/should_compile/T16391a.hs      | 16 +++++
 testsuite/tests/dependent/should_compile/all.T     |  1 +
 testsuite/tests/dependent/should_fail/T16391b.hs   | 11 ++++
 .../tests/dependent/should_fail/T16391b.stderr     |  6 ++
 testsuite/tests/dependent/should_fail/all.T        |  1 +
 testsuite/tests/ghci/scripts/T11524a.stdout        | 10 ++--
 .../tests/patsyn/should_compile/T11213.stderr      |  6 +-
 utils/haddock                                      |  2 +-
 12 files changed, 132 insertions(+), 35 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 068b7e983f4a0b35f453aa5e609998efd0c3f334


More information about the ghc-commits mailing list