Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : ghc-new-co
http://hackage.haskell.org/trac/ghc/changeset/fdf8656855d26105ff36bdd24d41827b05037b91 >--------------------------------------------------------------- commit fdf8656855d26105ff36bdd24d41827b05037b91 Author: Simon Peyton Jones <simo...@microsoft.com> Date: Tue Apr 19 11:06:20 2011 +0100 This BIG PATCH contains most of the work for the New Coercion Representation See the paper "Practical aspects of evidence based compilation in System FC" * Coercion becomes a data type, distinct from Type * Coercions become value-level things, rather than type-level things, (although the value is zero bits wide, like the State token) A consequence is that a coerion abstraction increases the arity by 1 (just like a dictionary abstraction) * There is a new constructor in CoreExpr, namely Coercion, to inject coercions into terms compiler/basicTypes/DataCon.lhs | 87 +- compiler/basicTypes/Id.lhs | 39 +- compiler/basicTypes/IdInfo.lhs | 5 +- compiler/basicTypes/IdInfo.lhs-boot | 2 + compiler/basicTypes/MkId.lhs | 108 +- compiler/basicTypes/Var.lhs | 86 +- compiler/basicTypes/VarEnv.lhs | 3 +- compiler/basicTypes/VarSet.lhs | 6 +- compiler/cmm/CmmCPS.hs | 1 + compiler/coreSyn/CoreArity.lhs | 42 +- compiler/coreSyn/CoreFVs.lhs | 21 +- compiler/coreSyn/CoreLint.lhs | 446 +++--- compiler/coreSyn/CorePrep.lhs | 37 +- compiler/coreSyn/CoreSubst.lhs | 255 ++-- compiler/coreSyn/CoreSyn.lhs | 59 +- compiler/coreSyn/CoreTidy.lhs | 9 +- compiler/coreSyn/CoreUnfold.lhs | 44 +- compiler/coreSyn/CoreUtils.lhs | 239 ++-- compiler/coreSyn/ExternalCore.lhs | 13 +- compiler/coreSyn/MkCore.lhs | 10 +- compiler/coreSyn/MkExternalCore.lhs | 57 +- compiler/coreSyn/PprCore.lhs | 16 +- compiler/coreSyn/PprExternalCore.lhs | 6 +- compiler/deSugar/Check.lhs | 1 - compiler/deSugar/Desugar.lhs | 2 + compiler/deSugar/DsBinds.lhs | 20 +- compiler/deSugar/DsCCall.lhs | 4 +- compiler/deSugar/DsExpr.lhs | 30 +- compiler/deSugar/DsForeign.lhs | 13 +- compiler/deSugar/DsUtils.lhs | 11 +- compiler/deSugar/Match.lhs | 14 +- compiler/deSugar/MatchCon.lhs | 1 - compiler/ghc.cabal.in | 2 + compiler/ghci/ByteCodeGen.lhs | 9 +- compiler/ghci/RtClosureInspect.hs | 6 +- compiler/hsSyn/HsBinds.lhs | 10 +- compiler/hsSyn/HsPat.lhs | 4 +- compiler/hsSyn/HsUtils.lhs | 32 +- compiler/iface/BinIface.hs | 99 +- compiler/iface/BuildTyCl.lhs | 20 +- compiler/iface/IfaceSyn.lhs | 24 +- compiler/iface/IfaceType.lhs | 112 +- compiler/iface/MkIface.lhs | 37 +- compiler/iface/TcIface.lhs | 76 +- compiler/main/DynFlags.hs | 4 +- compiler/main/GHC.hs | 7 +- compiler/main/HscTypes.lhs | 27 +- compiler/main/PprTyThing.hs | 9 +- compiler/main/TidyPgm.lhs | 1 + compiler/parser/ParserCore.y | 2 +- compiler/prelude/PrelNames.lhs | 13 +- compiler/prelude/PrelRules.lhs | 4 +- compiler/prelude/TysPrim.lhs | 312 +++-- compiler/prelude/TysWiredIn.lhs | 29 +- compiler/rename/RnNames.lhs | 2 +- compiler/rename/RnTypes.lhs | 2 +- compiler/simplCore/CSE.lhs | 2 + compiler/simplCore/FloatIn.lhs | 6 +- compiler/simplCore/FloatOut.lhs | 1 + compiler/simplCore/LiberateCase.lhs | 1 + compiler/simplCore/OccurAnal.lhs | 101 +- compiler/simplCore/SAT.lhs | 23 +- compiler/simplCore/SetLevels.lhs | 15 +- compiler/simplCore/SimplEnv.lhs | 69 +- compiler/simplCore/SimplUtils.lhs | 34 +- compiler/simplCore/Simplify.lhs | 148 ++- compiler/specialise/Rules.lhs | 30 +- compiler/specialise/SpecConstr.lhs | 34 +- compiler/specialise/Specialise.lhs | 7 +- compiler/stgSyn/CoreToStg.lhs | 10 +- compiler/stgSyn/StgSyn.lhs | 24 +- compiler/stranal/DmdAnal.lhs | 33 +- compiler/stranal/WorkWrap.lhs | 1 + compiler/stranal/WwLib.lhs | 27 +- compiler/typecheck/FamInst.lhs | 8 +- compiler/typecheck/Inst.lhs | 10 +- compiler/typecheck/TcArrows.lhs | 16 +- compiler/typecheck/TcBinds.lhs | 2 +- compiler/typecheck/TcCanonical.lhs | 190 +-- compiler/typecheck/TcDeriv.lhs | 10 +- compiler/typecheck/TcEnv.lhs | 5 +- compiler/typecheck/TcErrors.lhs | 14 +- compiler/typecheck/TcExpr.lhs | 70 +- compiler/typecheck/TcGenDeriv.lhs | 3 +- compiler/typecheck/TcHsSyn.lhs | 35 +- compiler/typecheck/TcHsType.lhs | 17 +- compiler/typecheck/TcInstDcls.lhs | 233 +++- compiler/typecheck/TcInteract.lhs | 104 +- compiler/typecheck/TcMType.lhs | 47 +- compiler/typecheck/TcMatches.lhs | 8 +- compiler/typecheck/TcPat.lhs | 41 +- compiler/typecheck/TcRnDriver.lhs | 57 +- compiler/typecheck/TcRnMonad.lhs | 4 +- compiler/typecheck/TcRnTypes.lhs | 7 +- compiler/typecheck/TcRules.lhs | 1 - compiler/typecheck/TcSMonad.lhs | 12 +- compiler/typecheck/TcSimplify.lhs | 7 +- compiler/typecheck/TcSplice.lhs | 21 +- compiler/typecheck/TcTyClsDecls.lhs | 264 +--- compiler/typecheck/TcTyDecls.lhs | 2 +- compiler/typecheck/TcType.lhs | 328 ++--- compiler/typecheck/TcUnify.lhs | 101 +- compiler/typecheck/TcUnify.lhs-boot | 4 +- compiler/types/Coercion.lhs | 1562 ++++++++++++-------- compiler/types/FamInstEnv.lhs | 81 +- compiler/types/FunDeps.lhs | 4 +- compiler/types/InstEnv.lhs | 4 +- compiler/types/Kind.lhs | 232 +++ compiler/types/OptCoercion.lhs | 536 ++++---- compiler/types/TyCon.lhs | 234 ++-- compiler/types/Type.lhs | 645 ++++----- compiler/types/TypeRep.lhs | 573 +++++--- compiler/types/TypeRep.lhs-boot | 3 +- compiler/types/Unify.lhs | 71 +- compiler/utils/Pair.lhs | 47 + compiler/vectorise/Vectorise.hs | 3 +- compiler/vectorise/Vectorise/Builtins/Base.hs | 1 - .../vectorise/Vectorise/Builtins/Initialise.hs | 1 - compiler/vectorise/Vectorise/Exp.hs | 3 +- compiler/vectorise/Vectorise/Type/Env.hs | 1 - compiler/vectorise/Vectorise/Type/PRepr.hs | 11 +- compiler/vectorise/Vectorise/Type/Type.hs | 1 - compiler/vectorise/Vectorise/Utils.hs | 3 +- compiler/vectorise/Vectorise/Utils/Base.hs | 2 +- compiler/vectorise/Vectorise/Utils/Closure.hs | 1 - compiler/vectorise/Vectorise/Utils/Hoisting.hs | 1 - compiler/vectorise/Vectorise/Utils/PADict.hs | 7 +- compiler/vectorise/Vectorise/Utils/Poly.hs | 1 - compiler/vectorise/Vectorise/Var.hs | 1 - ghc/GhciTags.hs | 7 +- 130 files changed, 4778 insertions(+), 3975 deletions(-) Diff suppressed because of size. To see it, use: git show fdf8656855d26105ff36bdd24d41827b05037b91 _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc