summaryrefslogtreecommitdiff
path: root/compiler/hsSyn/HsExpr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/hsSyn/HsExpr.hs')
-rw-r--r--compiler/hsSyn/HsExpr.hs15
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/hsSyn/HsExpr.hs b/compiler/hsSyn/HsExpr.hs
index e4d843191f..617972decd 100644
--- a/compiler/hsSyn/HsExpr.hs
+++ b/compiler/hsSyn/HsExpr.hs
@@ -38,7 +38,6 @@ import BasicTypes
import ConLike
import SrcLoc
import Util
-import StaticFlags( opt_PprStyle_Debug )
import Outputable
import FastString
import Type
@@ -2465,12 +2464,14 @@ pprStmtContext (PatGuard ctxt) = text "pattern guard for" $$ pprMatchContext ctx
-- in a transformed branch of
-- transformed branch of
-- transformed branch of monad comprehension
-pprStmtContext (ParStmtCtxt c)
- | opt_PprStyle_Debug = sep [text "parallel branch of", pprAStmtContext c]
- | otherwise = pprStmtContext c
-pprStmtContext (TransStmtCtxt c)
- | opt_PprStyle_Debug = sep [text "transformed branch of", pprAStmtContext c]
- | otherwise = pprStmtContext c
+pprStmtContext (ParStmtCtxt c) =
+ sdocWithPprDebug $ \dbg -> if dbg
+ then sep [text "parallel branch of", pprAStmtContext c]
+ else pprStmtContext c
+pprStmtContext (TransStmtCtxt c) =
+ sdocWithPprDebug $ \dbg -> if dbg
+ then sep [text "transformed branch of", pprAStmtContext c]
+ else pprStmtContext c
instance (Outputable id, Outputable (NameOrRdrName id))
=> Outputable (HsStmtContext id) where