[commit: ghc] master: (Another) minor refactoring of substitutions (b529255)

git at git.haskell.org git at git.haskell.org
Thu Feb 18 12:52:31 UTC 2016


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

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

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

commit b5292557dcf2e3844b4837172230575d40a8917e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Feb 18 11:25:38 2016 +0000

    (Another) minor refactoring of substitutions
    
    No change in functionality here, but greater clarity:
    
    * In FamInstEnv.FlattenEnv, kill off the fi_in_scope field
      We are already maintaining an in-scope set in the fe_subst field,
      so it's silly do to it twice.
    
      (This isn't strictly connected to the rest of this patch, but
      the nomenclature changes below affect the same code, so I put
      them together.)
    
    * TyCoRep.extendTCVSubst used to take a TyVar or a CoVar and work
      out what to do, but in fact we almost always know which of the
      two we are doing.  So:
        - define extendTvSubst, extendCvSubst
        - and use them
    
    * Similar renamings in TyCoRep:
       - extendTCvSubstList        -->   extendTvSubstList
       - extendTCvSubstBinder      -->   extendTvSubstBinder
       - extendTCvSubstAndInScope  --> extendTvSubstAndInScope
    
    * Add Type.extendTvSubstWithClone, extendCvSubstWithClone
    
    * Similar nomenclature changes in Subst, SimplEnv, Specialise
    
    * Kill off TyCoRep.substTelescope (never used)


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

b5292557dcf2e3844b4837172230575d40a8917e
 compiler/basicTypes/MkId.hs        |  4 +-
 compiler/coreSyn/CoreLint.hs       |  2 +-
 compiler/coreSyn/CoreSubst.hs      | 47 +++++++++----------
 compiler/coreSyn/CoreUtils.hs      |  2 +-
 compiler/iface/IfaceType.hs        |  2 +-
 compiler/main/GhcPlugins.hs        |  2 +-
 compiler/simplCore/SimplEnv.hs     | 20 +++++----
 compiler/simplCore/Simplify.hs     | 16 +++----
 compiler/specialise/Specialise.hs  | 12 ++---
 compiler/typecheck/Inst.hs         |  5 ++-
 compiler/typecheck/TcClassDcl.hs   |  2 +-
 compiler/typecheck/TcExpr.hs       |  2 +-
 compiler/typecheck/TcHsType.hs     |  4 +-
 compiler/typecheck/TcMType.hs      | 47 ++++++++-----------
 compiler/typecheck/TcSMonad.hs     |  2 +-
 compiler/typecheck/TcTyClsDecls.hs |  4 +-
 compiler/typecheck/TcType.hs       |  5 ++-
 compiler/types/Coercion.hs         |  2 +-
 compiler/types/FamInstEnv.hs       | 29 ++++++------
 compiler/types/OptCoercion.hs      |  2 +-
 compiler/types/TyCoRep.hs          | 92 +++++++++++++++++++-------------------
 compiler/types/Type.hs             |  7 +--
 22 files changed, 149 insertions(+), 161 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 b5292557dcf2e3844b4837172230575d40a8917e


More information about the ghc-commits mailing list