[commit: ghc] wip/spj-early-inline: Improve pretty-printing of types (9ffdf62)
git at git.haskell.org
git at git.haskell.org
Fri Feb 17 16:28:35 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/spj-early-inline
Link : http://ghc.haskell.org/trac/ghc/changeset/9ffdf62b0ca72c4f35579f9d6f31a9beebf23025/ghc
>---------------------------------------------------------------
commit 9ffdf62b0ca72c4f35579f9d6f31a9beebf23025
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.
>---------------------------------------------------------------
9ffdf62b0ca72c4f35579f9d6f31a9beebf23025
compiler/backpack/RnModIface.hs | 4 +-
compiler/iface/IfaceSyn.hs | 2 +-
compiler/iface/IfaceType.hs | 38 +++++------
compiler/iface/TcIface.hs | 2 +-
compiler/iface/ToIface.hs | 143 +++++++++++++++++++++++-----------------
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 | 1 +
10 files changed, 134 insertions(+), 102 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 9ffdf62b0ca72c4f35579f9d6f31a9beebf23025
More information about the ghc-commits
mailing list