[commit: ghc] wip/rae: Update levity polymorphism (07ce8da)

git at git.haskell.org git at git.haskell.org
Wed Dec 14 02:18:39 UTC 2016


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

On branch  : wip/rae
Link       : http://ghc.haskell.org/trac/ghc/changeset/07ce8dab0091152ab8424eadecd67fe6d88b1ffb/ghc

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

commit 07ce8dab0091152ab8424eadecd67fe6d88b1ffb
Author: Richard Eisenberg <rae at cs.brynmawr.edu>
Date:   Tue Dec 13 17:43:32 2016 -0500

    Update levity polymorphism
    
    This commit implements the proposal in
    https://github.com/ghc-proposals/ghc-proposals/pull/29.
    
    Here are some of the pieces of that proposal:
    
    * Some of RuntimeRep's constructors have been shortened.
    
    * TupleRep and SumRep are now parameterized over a list of RuntimeReps.
    This
    means that two types with the same kind surely have the same
    representation.
    Previously, all unboxed tuples had the same kind, and thus the fact
    above was
    false.
    
    * RepType.typePrimRep and friends now return a *list* of PrimReps. These
    functions can now work successfully on unboxed tuples. This change is
    necessary because we allow abstraction over unboxed tuple types and so
    cannot
    always handle unboxed tuples specially as we did before.
    
    * The RepType.RepType type was removed, as it didn't seem to help with
    much.
    
    * The RepType.repType function is also removed, in favor of typePrimRep.
    
    * I have waffled a good deal on whether or not to keep VoidRep in
    TyCon.PrimRep. In the end, I decided to keep it there. PrimRep is *not*
    represented in RuntimeRep, and typePrimRep will never return a list
    including
    VoidRep. But it's handy to have in, e.g., ByteCodeGen and friends. I can
    imagine another design choice where we have a PrimRepV type that is
    PrimRep
    with an extra constructor. That seemed to be a heavier design, though,
    and I'm
    not sure what the benefit would be.
    
    * The last, unused vestiges of # (unliftedTypeKind) have been removed.


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

07ce8dab0091152ab8424eadecd67fe6d88b1ffb
 compiler/cmm/CmmUtils.hs          |   4 +-
 compiler/codeGen/StgCmm.hs        |   6 +-
 compiler/codeGen/StgCmmClosure.hs |  10 +-
 compiler/codeGen/StgCmmEnv.hs     |   5 +-
 compiler/codeGen/StgCmmForeign.hs |  11 +-
 compiler/codeGen/StgCmmUtils.hs   |   6 +-
 compiler/coreSyn/CoreLint.hs      |  15 +-
 compiler/deSugar/DsForeign.hs     |   7 +-
 compiler/ghci/ByteCodeGen.hs      |  60 ++++----
 compiler/ghci/ByteCodeItbls.hs    |   4 +-
 compiler/ghci/RtClosureInspect.hs |  29 ++--
 compiler/iface/IfaceType.hs       |  22 +--
 compiler/main/InteractiveEval.hs  |   5 +-
 compiler/prelude/PrelNames.hs     |  16 +-
 compiler/prelude/PrimOp.hs        |   8 +-
 compiler/prelude/TysPrim.hs       | 118 +++++++--------
 compiler/prelude/TysWiredIn.hs    | 168 +++++++++++++++------
 compiler/simplStg/RepType.hs      | 305 ++++++++++++++++++--------------------
 compiler/simplStg/UnariseStg.hs   |  52 ++++---
 compiler/stgSyn/CoreToStg.hs      |   3 +-
 compiler/stgSyn/StgLint.hs        |   4 +-
 compiler/stgSyn/StgSyn.hs         |   4 +-
 compiler/typecheck/TcErrors.hs    |  15 +-
 compiler/typecheck/TcHsSyn.hs     | 104 +++----------
 compiler/typecheck/TcHsType.hs    |  13 +-
 compiler/typecheck/TcMType.hs     |   2 +-
 compiler/typecheck/TcSimplify.hs  |  13 +-
 compiler/typecheck/TcType.hs      |   8 +-
 compiler/types/FamInstEnv.hs      |   2 -
 compiler/types/Kind.hs            |   2 +-
 compiler/types/TyCoRep.hs         |   6 +-
 compiler/types/TyCon.hs           |   2 +-
 compiler/types/Type.hs            |   5 +-
 libraries/ghc-prim/GHC/Types.hs   |  16 +-
 34 files changed, 501 insertions(+), 549 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 07ce8dab0091152ab8424eadecd67fe6d88b1ffb


More information about the ghc-commits mailing list