[commit: ghc] master: Improve debug WARNING message (9b602e7)
Simon Peyton Jones
simonpj at microsoft.com
Fri Mar 16 15:27:44 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9b602e75aa46edbdb5120eafb106da0b3478e05b
>---------------------------------------------------------------
commit 9b602e75aa46edbdb5120eafb106da0b3478e05b
Author: Simon Peyton Jones <simonpj at microsoft.com>
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.
More information about the Cvs-ghc
mailing list