[commit: ghc] ghc-8.0: Tidy up handling of coercion variables (c12ae2f)

git at git.haskell.org git at git.haskell.org
Thu Mar 24 23:43:13 UTC 2016


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

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

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

commit c12ae2f986d4cd59e38752da7fd7b597d6ba903e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Mar 24 17:31:12 2016 +0000

    Tidy up handling of coercion variables
    
    * Comments to explain that a CoVar, whose IdInfo is CoVarId,
      is always unlifted (but may be nominal or representational role)
    
      And TyCoRep.isCoercionType picks out only those unlifted
      types, NOT the lifted versions
    
    * Introduce Var.NcId for non-co-var Ids
      with predicate isNonCoVarId
    
    * Add assertions in CoreSubst that the Id env is only
      used for NcIds
    
    * Fix lurking bug in CSE which extended the
      CoreSubst Id env with a CoVar
    
    * Fix two bugs in Specialise.spec_call, which wrongly treated
      CoVars like NcIds
        - needed a varToCoreExpr in one place
        - needed extendSubst not extendIdSubst in another
      This was the root cause of Trac #11644
    
    Minor refactoring
    
    * Eliminate unused mkDerivedLocalCoVarM, mkUserLocalCoVar
    * Small refactor in mkSysLocalOrCoVar
    
    (cherry picked from commit cb08f8da37ff5fb99e1d02b8afdcb802d23e9a8d)


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

c12ae2f986d4cd59e38752da7fd7b597d6ba903e
 compiler/basicTypes/Id.hs                          | 20 ++----------
 compiler/basicTypes/IdInfo.hs                      |  4 ++-
 compiler/basicTypes/Var.hs                         | 37 +++++++++++++++-------
 compiler/coreSyn/CoreLint.hs                       |  2 +-
 compiler/coreSyn/CoreSubst.hs                      | 12 ++++---
 compiler/simplCore/CSE.hs                          | 16 ++++++----
 compiler/specialise/Specialise.hs                  | 14 +++++---
 compiler/types/TyCoRep.hs                          |  4 ++-
 .../should_compile/T11644.hs}                      |  2 +-
 testsuite/tests/simplCore/should_compile/all.T     |  1 +
 10 files changed, 64 insertions(+), 48 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 c12ae2f986d4cd59e38752da7fd7b597d6ba903e


More information about the ghc-commits mailing list