summaryrefslogtreecommitdiff
path: root/compiler/types/TyCoPpr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/types/TyCoPpr.hs')
-rw-r--r--compiler/types/TyCoPpr.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/types/TyCoPpr.hs b/compiler/types/TyCoPpr.hs
index fbbdfbd7a0..f7a768210b 100644
--- a/compiler/types/TyCoPpr.hs
+++ b/compiler/types/TyCoPpr.hs
@@ -5,7 +5,7 @@ module TyCoPpr
PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,
-- * Pretty-printing types
- pprType, pprParendType, pprPrecType, pprPrecTypeX,
+ pprType, pprParendType, pprTidiedType, pprPrecType, pprPrecTypeX,
pprTypeApp, pprTCvBndr, pprTCvBndrs,
pprSigmaType,
pprTheta, pprParendTheta, pprForAll, pprUserForAll,
@@ -81,10 +81,13 @@ See Note [Precedence in types] in BasicTypes.
-- See Note [Pretty printing via Iface syntax] in PprTyThing
--------------------------------------------------------
-pprType, pprParendType :: Type -> SDoc
+pprType, pprParendType, pprTidiedType :: Type -> SDoc
pprType = pprPrecType topPrec
pprParendType = pprPrecType appPrec
+-- already pre-tidied
+pprTidiedType = pprIfaceType . toIfaceTypeX emptyVarSet
+
pprPrecType :: PprPrec -> Type -> SDoc
pprPrecType = pprPrecTypeX emptyTidyEnv