From 3545603ca61d81093151307477bdecb7910cb1b7 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Fri, 18 Dec 2009 16:35:49 +0000 Subject: [PATCH] Make warning printing a bit less noisy Use -dppr-debug to make it noisy again --- compiler/coreSyn/CoreSubst.lhs | 3 ++- compiler/utils/Outputable.lhs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs index 8ca99fa..216b636 100644 --- a/compiler/coreSyn/CoreSubst.lhs +++ b/compiler/coreSyn/CoreSubst.lhs @@ -534,7 +534,8 @@ substUnfoldingSource (Subst in_scope ids _) (InlineWrapper wkr) = case wkr_expr of Var w1 -> InlineWrapper w1 _other -> WARN( True, text "Interesting! CoreSubst.substWorker1:" <+> ppr wkr - <+> equals <+> ppr wkr_expr ) -- Note [Worker inlining] + <+> ifPprDebug (equals <+> ppr wkr_expr) ) + -- Note [Worker inlining] InlineRule -- It's not a wrapper any more, but still inline it! | Just w1 <- lookupInScope in_scope wkr = InlineWrapper w1 diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index fd50fb5..84e8b9d 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -790,7 +790,7 @@ warnPprTrace :: Bool -> String -> Int -> SDoc -> a -> a warnPprTrace _ _file _line _msg x | opt_NoDebugOutput = x warnPprTrace False _file _line _msg x = x warnPprTrace True file line msg x - = trace (show (doc PprDebug)) x + = trace (show (doc defaultDumpStyle)) x where doc = sep [hsep [text "WARNING: file", text file, text "line", int line], msg] -- 1.7.10.4