projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'coloured-core' of https://github.com/nominolo/ghc into coloured-core
[ghc-hetmet.git]
/
compiler
/
main
/
ErrUtils.lhs
diff --git
a/compiler/main/ErrUtils.lhs
b/compiler/main/ErrUtils.lhs
index
15b142b
..
b6297a2
100644
(file)
--- a/
compiler/main/ErrUtils.lhs
+++ b/
compiler/main/ErrUtils.lhs
@@
-22,7
+22,7
@@
module ErrUtils (
mkDumpDoc, dumpSDoc,
-- * Messages during compilation
mkDumpDoc, dumpSDoc,
-- * Messages during compilation
- putMsg,
+ putMsg, putMsgWith,
errorMsg,
fatalErrorMsg,
compilationProgressMsg,
errorMsg,
fatalErrorMsg,
compilationProgressMsg,
@@
-67,7
+67,8
@@
mkLocMessage locn msg
-- would look strange. Better to say explicitly "<no location info>".
printError :: SrcSpan -> Message -> IO ()
-- would look strange. Better to say explicitly "<no location info>".
printError :: SrcSpan -> Message -> IO ()
-printError span msg = printErrs (mkLocMessage span msg $ defaultErrStyle)
+printError span msg =
+ printErrs (mkLocMessage span msg) defaultErrStyle
-- -----------------------------------------------------------------------------
-- -----------------------------------------------------------------------------
@@
-275,6
+276,12
@@
ifVerbose dflags val act
putMsg :: DynFlags -> Message -> IO ()
putMsg dflags msg = log_action dflags SevInfo noSrcSpan defaultUserStyle msg
putMsg :: DynFlags -> Message -> IO ()
putMsg dflags msg = log_action dflags SevInfo noSrcSpan defaultUserStyle msg
+putMsgWith :: DynFlags -> PrintUnqualified -> Message -> IO ()
+putMsgWith dflags print_unqual msg
+ = log_action dflags SevInfo noSrcSpan sty msg
+ where
+ sty = mkUserStyle print_unqual AllTheWay
+
errorMsg :: DynFlags -> Message -> IO ()
errorMsg dflags msg = log_action dflags SevError noSrcSpan defaultErrStyle msg
errorMsg :: DynFlags -> Message -> IO ()
errorMsg dflags msg = log_action dflags SevError noSrcSpan defaultErrStyle msg