[commit: ghc] ghc-8.0: Check InScopeSet in substTy and provide substTyUnchecked (481ff7a)

git at git.haskell.org git at git.haskell.org
Thu Jan 21 12:27:39 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/481ff7a08304011d7b9d95e399f7501d44951505/ghc

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

commit 481ff7a08304011d7b9d95e399f7501d44951505
Author: Bartosz Nitka <niteria at gmail.com>
Date:   Tue Jan 19 03:25:39 2016 -0800

    Check InScopeSet in substTy and provide substTyUnchecked
    
    This adds sanity checks to `substTy` that implement:
    
    > when calling substTy subst ty it should be the case that the in-scope
    > set in the substitution is a superset of
    > * The free vars of the range of the substitution
    > * The free vars of ty minus the domain of the substitution
    
    and replaces violators with unchecked version. The violators were found
    by running the GHC test suite.
    
    This ensures that I can work on this incrementally and that what I fix won't
    be undone by some other change.
    
    It also includes a couple of fixes that I've already done.
    
    Test Plan: ./validate
    
    Reviewers: simonmar, goldfire, simonpj, austin, bgamari
    
    Reviewed By: simonpj, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1792
    
    GHC Trac Issues: #11371
    
    (cherry picked from commit 9d33adb6f352ad4e488067a8756928b3778920e0)


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

481ff7a08304011d7b9d95e399f7501d44951505
 compiler/basicTypes/MkId.hs        |  2 +-
 compiler/basicTypes/VarEnv.hs      |  4 ++
 compiler/coreSyn/CoreSubst.hs      |  2 +-
 compiler/coreSyn/CoreUtils.hs      |  4 +-
 compiler/iface/BuildTyCl.hs        |  2 +-
 compiler/typecheck/Inst.hs         |  9 ++--
 compiler/typecheck/TcClassDcl.hs   |  4 +-
 compiler/typecheck/TcExpr.hs       |  2 +-
 compiler/typecheck/TcFlatten.hs    |  2 +-
 compiler/typecheck/TcHsType.hs     |  4 +-
 compiler/typecheck/TcInteract.hs   |  4 +-
 compiler/typecheck/TcMType.hs      | 25 ++++++----
 compiler/typecheck/TcPatSyn.hs     |  2 +-
 compiler/typecheck/TcSMonad.hs     |  8 ++--
 compiler/typecheck/TcTyClsDecls.hs |  2 +-
 compiler/typecheck/TcType.hs       |  1 +
 compiler/types/FamInstEnv.hs       |  2 +-
 compiler/types/TyCoRep.hs          | 96 ++++++++++++++++++++++++++++++--------
 compiler/types/Type.hs             |  3 +-
 compiler/utils/UniqFM.hs           |  3 ++
 20 files changed, 130 insertions(+), 51 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 481ff7a08304011d7b9d95e399f7501d44951505


More information about the ghc-commits mailing list