diff options
Diffstat (limited to 'compiler/main/PprTyThing.hs')
| -rw-r--r-- | compiler/main/PprTyThing.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs index 932b46c2f5..a60644155f 100644 --- a/compiler/main/PprTyThing.hs +++ b/compiler/main/PprTyThing.hs @@ -33,6 +33,7 @@ import Coercion( pprCoAxiom ) import HscTypes( tyThingParent_maybe ) import TcType import Name +import VarEnv( emptyTidyEnv ) import StaticFlags( opt_PprStyle_Debug ) import Outputable import FastString @@ -161,8 +162,12 @@ pprTypeForUser print_foralls ty | print_foralls = ppr tidy_ty | otherwise = ppr (mkPhiTy ctxt ty') where - tidy_ty = tidyTopType ty (_, ctxt, ty') = tcSplitSigmaTy tidy_ty + (_, tidy_ty) = tidyOpenType emptyTidyEnv ty + -- Often the types/kinds we print in ghci are fully generalised + -- and have no free variables, but it turns out that we sometimes + -- print un-generalised kinds (eg when doing :k T), so it's + -- better to use tidyOpenType here pprTyCon :: PrintExplicitForalls -> ShowSub -> TyCon -> SDoc pprTyCon pefas ss tyCon |
