Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/23b27e2cceec85666c766192572d5ef00342e79b

>---------------------------------------------------------------

commit 23b27e2cceec85666c766192572d5ef00342e79b
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Mar 14 17:28:50 2012 +0000

    Improve debug WARNING message

>---------------------------------------------------------------

 compiler/utils/Outputable.lhs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index b96ae5e..b58fcd4 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -958,10 +958,9 @@ 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
-  = pprDebugAndThen trace "WARNING:" doc x
+  = pprDebugAndThen trace str msg x
   where
-    doc = sep [hsep [text "WARNING: file", text file, text "line", int line],
-               msg]
+    str = showSDoc (hsep [text "WARNING: file", text file <> comma, text 
"line", int line])
 
 assertPprPanic :: String -> Int -> SDoc -> a
 -- ^ Panic with an assertation failure, recording the given file and line 
number.



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to