Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1eda228cf487643e422c20effc8163e71b46efa2 >--------------------------------------------------------------- commit 1eda228cf487643e422c20effc8163e71b46efa2 Author: Ian Lynagh <[email protected]> Date: Tue Jun 12 23:23:03 2012 +0100 Pass DynFlags down to pprDefiniteTrace >--------------------------------------------------------------- compiler/simplCore/Simplify.lhs | 8 ++++---- 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 44286b4..fca2f1f 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 6a9fbdd..b402747 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' _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
