[commit: ghc] master: Tidy up handling of coercion variables (cb08f8d)
git at git.haskell.org
git at git.haskell.org
Thu Mar 24 17:29:35 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cb08f8da37ff5fb99e1d02b8afdcb802d23e9a8d/ghc
>---------------------------------------------------------------
commit cb08f8da37ff5fb99e1d02b8afdcb802d23e9a8d
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
>---------------------------------------------------------------
cb08f8da37ff5fb99e1d02b8afdcb802d23e9a8d
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 cb08f8da37ff5fb99e1d02b8afdcb802d23e9a8d
More information about the ghc-commits
mailing list