[commit: ghc] ghc-8.0: (Another) minor refactoring of substitutions (5da67ba)

git at git.haskell.org git at git.haskell.org
Sun Mar 13 22:33:15 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/5da67bae23313cd5632c903c8369e03865628b34/ghc

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

commit 5da67bae23313cd5632c903c8369e03865628b34
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)
    
    (cherry picked from commit b5292557dcf2e3844b4837172230575d40a8917e)


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

5da67bae23313cd5632c903c8369e03865628b34
 compiler/basicTypes/MkId.hs        |  6 +--
 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, 150 insertions(+), 162 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 5da67bae23313cd5632c903c8369e03865628b34


More information about the ghc-commits mailing list