[commit: ghc] master: Cache TypeRep kinds aggressively (bc761ad)

git at git.haskell.org git at git.haskell.org
Fri Dec 1 23:37:47 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8/ghc

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

commit bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8
Author: David Feuer <david.feuer at gmail.com>
Date:   Fri Dec 1 17:00:24 2017 -0500

    Cache TypeRep kinds aggressively
    
    Cache `TypeRep k` in each `TrApp` or `TrTyCon` constructor of
    `TypeRep (a :: k)`. This makes `typeRepKind` cheap.
    
    With this change, we won't need any special effort to deserialize
    typereps efficiently. The downside, of course, is that we make
    `TypeRep`s slightly larger.
    
    Reviewers: austin, hvr, bgamari, simonpj
    
    Reviewed By: bgamari, simonpj
    
    Subscribers: carter, simonpj, rwbarton, thomie
    
    GHC Trac Issues: #14254
    
    Differential Revision: https://phabricator.haskell.org/D4085


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

bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8
 compiler/deSugar/DsBinds.hs                        |  17 +-
 compiler/prelude/PrelNames.hs                      |  25 +--
 compiler/typecheck/TcTypeable.hs                   |  16 +-
 libraries/base/Data/Typeable/Internal.hs           | 200 ++++++++++++++++-----
 libraries/base/GHC/Show.hs                         |  38 ++++
 libraries/base/Type/Reflection/Unsafe.hs           |  11 +-
 .../tests/ghci.debugger/scripts/break006.stderr    |   4 +-
 .../tests/ghci.debugger/scripts/print019.stderr    |   2 +-
 .../tests/indexed-types/should_fail/T12522a.stderr |   2 +-
 .../should_fail/overloadedlistsfail01.stderr       |   2 +-
 .../tests/typecheck/should_compile/holes2.stderr   |   2 +-
 .../tests/typecheck/should_fail/tcfail133.stderr   |   2 +-
 12 files changed, 251 insertions(+), 70 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 bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8


More information about the ghc-commits mailing list