Commit 1eda228c authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Pass DynFlags down to pprDefiniteTrace

parent 330f1541
......@@ -1422,10 +1422,10 @@ completeCall env var cont
| not (dopt Opt_D_dump_inlinings dflags) = stuff
| not (dopt Opt_D_verbose_core2core dflags)
= if isExternalName (idName var) then
pprDefiniteTrace "Inlining done:" (ppr var) stuff
pprDefiniteTrace dflags "Inlining done:" (ppr var) stuff
else stuff
| otherwise
= pprDefiniteTrace ("Inlining done: " ++ showSDocDump dflags (ppr var))
= pprDefiniteTrace dflags ("Inlining done: " ++ showSDocDump dflags (ppr var))
(vcat [text "Inlined fn: " <+> nest 2 (ppr unfolding),
text "Cont: " <+> ppr cont])
stuff
......@@ -1573,10 +1573,10 @@ tryRules env rules fn args call_cont
, not (dopt Opt_D_dump_rule_rewrites dflags) = stuff
| not (dopt Opt_D_dump_rule_rewrites dflags)
= pprDefiniteTrace "Rule fired:" (ftext (ru_name rule)) stuff
= pprDefiniteTrace dflags "Rule fired:" (ftext (ru_name rule)) stuff
| otherwise
= pprDefiniteTrace "Rule fired"
= pprDefiniteTrace dflags "Rule fired"
(vcat [text "Rule:" <+> ftext (ru_name rule),
text "Before:" <+> hang (ppr fn) 2 (sep (map pprParendExpr args)),
text "After: " <+> pprCoreExpr rule_rhs,
......
......@@ -924,9 +924,9 @@ pprTrace str doc x
| opt_NoDebugOutput = x
| otherwise = pprDebugAndThen tracingDynFlags trace str doc x
pprDefiniteTrace :: String -> SDoc -> a -> a
pprDefiniteTrace :: DynFlags -> String -> SDoc -> a -> a
-- ^ Same as pprTrace, but show even if -dno-debug-output is on
pprDefiniteTrace str doc x = pprDebugAndThen tracingDynFlags trace str doc x
pprDefiniteTrace dflags str doc x = pprDebugAndThen dflags trace str doc x
pprPanicFastInt :: String -> SDoc -> FastInt
-- ^ Specialization of pprPanic that can be safely used with 'FastInt'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment