summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-06-03 14:15:52 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2014-06-03 14:24:08 +0100
commitb4856f9f4f0fb3db473901b247d3fa94a11c25a0 (patch)
tree64512fff57acca9baf54d0e72d516679763711a9 /ghc
parentda64c97f1c0b147ea80a34fe64fe947ba7820c00 (diff)
downloadhaskell-b4856f9f4f0fb3db473901b247d3fa94a11c25a0.tar.gz
Do pretty-printing of TyThings via IfaceDecl (Trac #7730)
All the initial work on this was done fy 'archblob' (fcsernik@gmail.com); thank you! I reviewed the patch, started some tidying, up and then ended up in a huge swamp of changes, not all of which I can remember now. But: * To suppress kind arguments when we have -fno-print-explicit-kinds, - IfaceTyConApp argument types are in a tagged list IfaceTcArgs * To allow overloaded types to be printed with =>, add IfaceDFunTy to IfaceType. * When printing data/type family instances for the user, I've made them print out an informative RHS, which is a new feature. Thus ghci> info T data family T a data instance T Int = T1 Int Int data instance T Bool = T2 * In implementation terms, pprIfaceDecl has just one "context" argument, of type IfaceSyn.ShowSub, which says - How to print the binders of the decl see note [Printing IfaceDecl binders] in IfaceSyn - Which sub-comoponents (eg constructors) to print * Moved FastStringEnv from RnEnv to OccName It all took a ridiculously long time to do. But it's done!
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 3f93972d76..53ada93126 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -1494,7 +1494,7 @@ kindOfType norm str
$ do
(ty, kind) <- GHC.typeKind norm str
printForUser $ vcat [ text str <+> dcolon <+> pprTypeForUser kind
- , ppWhen norm $ equals <+> ppr ty ]
+ , ppWhen norm $ equals <+> pprTypeForUser ty ]
-----------------------------------------------------------------------------