diff options
-rw-r--r-- | compiler/simplCore/Simplify.lhs | 8 | ||||
-rw-r--r-- | compiler/utils/Outputable.lhs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/compiler/simplCore/Simplify.lhs b/compiler/simplCore/Simplify.lhs index 44286b4725..fca2f1fff9 100644 --- a/compiler/simplCore/Simplify.lhs +++ b/compiler/simplCore/Simplify.lhs @@ -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, diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 6a9fbdd117..b4027473ef 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -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' |