summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2022-04-13 11:37:45 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-27 10:06:43 -0400
commita2e5ab705dada18a88d8594b299c9950da50adb0 (patch)
treed4de1dd5e3af399b2b8603b9378cb8ca865fc526
parentee11d04363ed8aa1d73a0cda16076a39e668d163 (diff)
downloadhaskell-a2e5ab705dada18a88d8594b299c9950da50adb0.tar.gz
Change `-dsuppress-ticks` to only suppress non-code ticks.
This means cost centres and coverage ticks will still be present in output. Makes using -dsuppress-all more convenient when looking at profiled builds.
-rw-r--r--compiler/GHC/Core/Ppr.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/GHC/Core/Ppr.hs b/compiler/GHC/Core/Ppr.hs
index 816af025fc..3f22e17bbe 100644
--- a/compiler/GHC/Core/Ppr.hs
+++ b/compiler/GHC/Core/Ppr.hs
@@ -311,8 +311,10 @@ ppr_expr add_par (Let bind expr)
ppr_expr add_par (Tick tickish expr)
= sdocOption sdocSuppressTicks $ \case
- True -> ppr_expr add_par expr
- False -> add_par (sep [ppr tickish, pprCoreExpr expr])
+ -- Only hide non-runtime relevant ticks.
+ True
+ | not (tickishIsCode tickish) -> ppr_expr add_par expr
+ _ -> add_par (sep [ppr tickish, pprCoreExpr expr])
pprCoreAlt :: OutputableBndr a => Alt a -> SDoc
pprCoreAlt (Alt con args rhs)