summaryrefslogtreecommitdiff
path: root/compiler/GHC/Core
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r--compiler/GHC/Core/Ppr.hs4
-rw-r--r--compiler/GHC/Core/TyCo/Ppr.hs3
-rw-r--r--compiler/GHC/Core/TyCon.hs8
3 files changed, 9 insertions, 6 deletions
diff --git a/compiler/GHC/Core/Ppr.hs b/compiler/GHC/Core/Ppr.hs
index e9c746d7a6..c0b2749359 100644
--- a/compiler/GHC/Core/Ppr.hs
+++ b/compiler/GHC/Core/Ppr.hs
@@ -375,8 +375,8 @@ pprCoreBinder LetBind binder
-- Lambda bound type variables are preceded by "@"
pprCoreBinder bind_site bndr
- = getPprStyle $ \ sty ->
- pprTypedLamBinder bind_site (debugStyle sty) bndr
+ = getPprDebug $ \debug ->
+ pprTypedLamBinder bind_site debug bndr
pprUntypedBinder :: Var -> SDoc
pprUntypedBinder binder
diff --git a/compiler/GHC/Core/TyCo/Ppr.hs b/compiler/GHC/Core/TyCo/Ppr.hs
index 973641bf5c..6678a00559 100644
--- a/compiler/GHC/Core/TyCo/Ppr.hs
+++ b/compiler/GHC/Core/TyCo/Ppr.hs
@@ -93,7 +93,8 @@ pprPrecType = pprPrecTypeX emptyTidyEnv
pprPrecTypeX :: TidyEnv -> PprPrec -> Type -> SDoc
pprPrecTypeX env prec ty
= getPprStyle $ \sty ->
- if debugStyle sty -- Use debugPprType when in
+ getPprDebug $ \debug ->
+ if debug -- Use debugPprType when in
then debug_ppr_ty prec ty -- when in debug-style
else pprPrecIfaceType prec (tidyToIfaceTypeStyX env ty sty)
-- NB: debug-style is used for -dppr-debug
diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs
index 863c3b2f46..0f850f2278 100644
--- a/compiler/GHC/Core/TyCon.hs
+++ b/compiler/GHC/Core/TyCon.hs
@@ -2576,9 +2576,11 @@ instance Outputable TyCon where
-- corresponding TyCon, so we add the quote to distinguish it here
ppr tc = pprPromotionQuote tc <> ppr (tyConName tc) <> pp_tc
where
- pp_tc = getPprStyle $ \sty -> if ((debugStyle sty || dumpStyle sty) && isTcTyCon tc)
- then text "[tc]"
- else empty
+ pp_tc = getPprStyle $ \sty ->
+ getPprDebug $ \debug ->
+ if ((debug || dumpStyle sty) && isTcTyCon tc)
+ then text "[tc]"
+ else empty
-- | Paints a picture of what a 'TyCon' represents, in broad strokes.
-- This is used towards more informative error messages.