summaryrefslogtreecommitdiff
path: root/compiler/GHC/Hs/Pat.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Hs/Pat.hs')
-rw-r--r--compiler/GHC/Hs/Pat.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/GHC/Hs/Pat.hs b/compiler/GHC/Hs/Pat.hs
index 4f73aa3e98..50d3cf4aef 100644
--- a/compiler/GHC/Hs/Pat.hs
+++ b/compiler/GHC/Hs/Pat.hs
@@ -514,14 +514,13 @@ hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl
instance OutputableBndrId p => Outputable (Pat (GhcPass p)) where
ppr = pprPat
+-- | Print with type info if -dppr-debug is on
pprPatBndr :: OutputableBndr name => name -> SDoc
-pprPatBndr var -- Print with type info if -dppr-debug is on
- = getPprStyle $ \ sty ->
- if debugStyle sty then
- parens (pprBndr LambdaBind var) -- Could pass the site to pprPat
- -- but is it worth it?
- else
- pprPrefixOcc var
+pprPatBndr var
+ = getPprDebug $ \case
+ True -> parens (pprBndr LambdaBind var) -- Could pass the site to pprPat
+ -- but is it worth it?
+ False -> pprPrefixOcc var
pprParendLPat :: (OutputableBndrId p)
=> PprPrec -> LPat (GhcPass p) -> SDoc