[commit: ghc] master: Check InScopeSet in substTy and provide substTyUnchecked (9d33adb)

git at git.haskell.org git at git.haskell.org
Tue Jan 19 11:25:07 UTC 2016


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

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

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

commit 9d33adb6f352ad4e488067a8756928b3778920e0
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


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

9d33adb6f352ad4e488067a8756928b3778920e0
 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     |  6 +--
 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, 128 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 9d33adb6f352ad4e488067a8756928b3778920e0


More information about the ghc-commits mailing list