[commit: ghc] master: Coercion Quantification (ea5ade3)
git at git.haskell.org
git at git.haskell.org
Sat Sep 15 14:29:03 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ea5ade34788f29f5902c5475e94fbac13110eea5/ghc
>---------------------------------------------------------------
commit ea5ade34788f29f5902c5475e94fbac13110eea5
Author: ningning <xnningxie at gmail.com>
Date: Sat Sep 15 10:16:47 2018 -0400
Coercion Quantification
This patch corresponds to #15497.
According to https://ghc.haskell.org/trac/ghc/wiki/DependentHaskell/Phase2,
we would like to have coercion quantifications back. This will
allow us to migrate (~#) to be homogeneous, instead of its current
heterogeneous definition. This patch is (lots of) plumbing only. There
should be no user-visible effects.
An overview of changes:
- Both `ForAllTy` and `ForAllCo` can quantify over coercion variables,
but only in *Core*. All relevant functions are updated accordingly.
- Small changes that should be irrelevant to the main task:
1. removed dead code `mkTransAppCo` in Coercion
2. removed out-dated Note Computing a coercion kind and
roles in Coercion
3. Added `Eq4` in Note Respecting definitional equality in
TyCoRep, and updated `mkCastTy` accordingly.
4. Various updates and corrections of notes and typos.
- Haddock submodule needs to be changed too.
Acknowledgments:
This work was completed mostly during Ningning Xie's Google Summer
of Code, sponsored by Google. It was advised by Richard Eisenberg,
supported by NSF grant 1704041.
Test Plan: ./validate
Reviewers: goldfire, simonpj, bgamari, hvr, erikd, simonmar
Subscribers: RyanGlScott, monoidal, rwbarton, carter
GHC Trac Issues: #15497
Differential Revision: https://phabricator.haskell.org/D5054
>---------------------------------------------------------------
ea5ade34788f29f5902c5475e94fbac13110eea5
compiler/backpack/RnModIface.hs | 10 +-
compiler/basicTypes/ConLike.hs | 16 +-
compiler/basicTypes/DataCon.hs | 262 ++++++++++++--------
compiler/basicTypes/DataCon.hs-boot | 6 +-
compiler/basicTypes/MkId.hs | 23 +-
compiler/basicTypes/PatSyn.hs | 10 +-
compiler/basicTypes/Var.hs | 83 ++++---
compiler/coreSyn/CoreArity.hs | 19 +-
compiler/coreSyn/CoreFVs.hs | 2 +-
compiler/coreSyn/CoreLint.hs | 107 ++++++--
compiler/coreSyn/CoreMap.hs | 8 +-
compiler/coreSyn/CoreOpt.hs | 24 +-
compiler/coreSyn/CoreSubst.hs | 10 +-
compiler/coreSyn/CoreTidy.hs | 4 +-
compiler/coreSyn/CoreUtils.hs | 21 +-
compiler/deSugar/DsForeign.hs | 2 +-
compiler/deSugar/MatchCon.hs | 7 +-
compiler/ghci/RtClosureInspect.hs | 7 +-
compiler/iface/BuildTyCl.hs | 2 +-
compiler/iface/IfaceSyn.hs | 43 ++--
compiler/iface/IfaceType.hs | 96 ++++---
compiler/iface/IfaceType.hs-boot | 9 +-
compiler/iface/MkIface.hs | 28 +--
compiler/iface/TcIface.hs | 51 ++--
compiler/iface/ToIface.hs | 43 ++--
compiler/iface/ToIface.hs-boot | 4 +-
compiler/prelude/TysPrim.hs | 8 +-
compiler/prelude/TysWiredIn.hs | 10 +-
compiler/specialise/SpecConstr.hs | 1 -
compiler/typecheck/Inst.hs | 6 +-
compiler/typecheck/TcCanonical.hs | 4 +-
compiler/typecheck/TcErrors.hs | 4 +-
compiler/typecheck/TcFlatten.hs | 42 ++--
compiler/typecheck/TcForeign.hs | 2 +-
compiler/typecheck/TcGenFunctor.hs | 2 +-
compiler/typecheck/TcHsSyn.hs | 18 +-
compiler/typecheck/TcHsType.hs | 14 +-
compiler/typecheck/TcMType.hs | 18 +-
compiler/typecheck/TcPatSyn.hs | 6 +-
compiler/typecheck/TcRnTypes.hs | 2 +-
compiler/typecheck/TcSplice.hs | 4 +-
compiler/typecheck/TcTyClsDecls.hs | 9 +-
compiler/typecheck/TcType.hs | 77 +++---
compiler/typecheck/TcTypeable.hs | 6 +-
compiler/typecheck/TcUnify.hs | 2 +-
compiler/typecheck/TcValidity.hs | 10 +-
compiler/types/Coercion.hs | 482 +++++++++++++++++++++++++-----------
compiler/types/FamInstEnv.hs | 57 ++---
compiler/types/OptCoercion.hs | 193 +++++++++++++--
compiler/types/TyCoRep.hs | 472 ++++++++++++++++++++++++-----------
compiler/types/TyCoRep.hs-boot | 2 +-
compiler/types/TyCon.hs | 124 +++++-----
compiler/types/Type.hs | 373 ++++++++++++++++++----------
compiler/types/Unify.hs | 34 ++-
utils/haddock | 2 +-
55 files changed, 1884 insertions(+), 997 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 ea5ade34788f29f5902c5475e94fbac13110eea5
More information about the ghc-commits
mailing list