[commit: ghc] wip/spj-early-inline4: Improve pretty-printing of types (03068bc)

git at git.haskell.org git at git.haskell.org
Sun Feb 26 18:06:18 UTC 2017


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

On branch  : wip/spj-early-inline4
Link       : http://ghc.haskell.org/trac/ghc/changeset/03068bc6b8783261ffbb4e66643c9d9c70bba23f/ghc

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

commit 03068bc6b8783261ffbb4e66643c9d9c70bba23f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Feb 17 12:30:35 2017 +0000

    Improve pretty-printing of types
    
    When doing debug-printing it's really important that the free vars
    of a type are printed with their uniques.  The IfaceTcTyVar thing
    was a stab in that direction, but it only worked for TcTyVars, not
    TyVars.
    
    This patch does it properly, by keeping track of the free vars of the
    type when translating Type -> IfaceType, and passing that down through
    toIfaceTypeX.  Then when we find a variable, look in that set, and
    translate it to IfaceFreeTyVar if so.  (I renamed IfaceTcTyVar to
    IfaceFreeTyVar.)
    
    Fiddly but not difficult.


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

03068bc6b8783261ffbb4e66643c9d9c70bba23f
 compiler/backpack/RnModIface.hs                    |   4 +-
 compiler/iface/IfaceSyn.hs                         |   2 +-
 compiler/iface/IfaceType.hs                        |  38 +++---
 compiler/iface/TcIface.hs                          |   2 +-
 compiler/iface/ToIface.hs                          | 147 ++++++++++++---------
 compiler/iface/ToIface.hs-boot                     |   2 +
 compiler/typecheck/TcRnTypes.hs                    |   5 +-
 compiler/types/TyCoRep.hs                          |  37 +++---
 compiler/types/Type.hs                             |   2 +-
 compiler/types/Type.hs-boot                        |   2 +-
 testsuite/tests/deriving/should_fail/T7148.stderr  |   8 +-
 testsuite/tests/th/T8761.stderr                    |  57 ++++----
 .../tests/typecheck/should_fail/T12785b.stderr     |  15 +--
 13 files changed, 175 insertions(+), 146 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 03068bc6b8783261ffbb4e66643c9d9c70bba23f


More information about the ghc-commits mailing list