summaryrefslogtreecommitdiff
path: root/compiler/cmm/PprCmm.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-02-17 14:50:59 +0000
committerBen Gamari <ben@smart-cactus.org>2017-02-20 13:33:12 -0500
commit2d5be63d1140a409eb18d1a77d439053844f7ce7 (patch)
tree788de731ff517049b1b0ed79bd4f21e67aacc3f1 /compiler/cmm/PprCmm.hs
parent0aafe5191c3c4b83cc414fb5cb31d2e6f100bee0 (diff)
downloadhaskell-2d5be63d1140a409eb18d1a77d439053844f7ce7.tar.gz
Change -dppr-ticks to -dsuppress-ticks
I spent about two hours today hunting fruitlessly for a simplifier bug (when fixing Trac #13255), only to find that it was caused by -ddump-X silently suppressing all ticks in Core. I think this has happened to me once before. So I've changed to make tick-printing on by default (like coercions, etc), with a flag -dsuppress-ticks (like -dsuppress-coercions) to suppress them. Blargh. -dppr-ticks is still there, but deprecated.
Diffstat (limited to 'compiler/cmm/PprCmm.hs')
-rw-r--r--compiler/cmm/PprCmm.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/cmm/PprCmm.hs b/compiler/cmm/PprCmm.hs
index 089066a1ab..d20f013cb8 100644
--- a/compiler/cmm/PprCmm.hs
+++ b/compiler/cmm/PprCmm.hs
@@ -186,15 +186,14 @@ pprNode node = pp_node <+> pp_debug
-- label:
CmmEntry id tscope -> ppr id <> colon <+>
(sdocWithDynFlags $ \dflags ->
- ppWhen (gopt Opt_PprShowTicks dflags) (text "//" <+> ppr tscope))
+ ppUnless (gopt Opt_SuppressTicks dflags) (text "//" <+> ppr tscope))
-- // text
CmmComment s -> text "//" <+> ftext s
-- //tick bla<...>
- CmmTick t -> if gopt Opt_PprShowTicks dflags
- then text "//tick" <+> ppr t
- else empty
+ CmmTick t -> ppUnless (gopt Opt_SuppressTicks dflags) $
+ text "//tick" <+> ppr t
-- unwind reg = expr;
CmmUnwind regs ->