summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-05-08 16:13:33 +0100
committerIan Lynagh <igloo@earth.li>2011-05-08 16:13:33 +0100
commitd45197aabb22178066a8ec50d29331786a0c518c (patch)
treefeac564466e2d1182b8d0ee7691580f564cf5b17 /compiler/main
parentc5f7496604b096277e3ba57fcb6ed85422613c75 (diff)
parentdaead6bf93cc751417461507048db9b1aa8b669a (diff)
downloadhaskell-coloured-core.tar.gz
Merge branch 'coloured-core' of https://github.com/nominolo/ghc into coloured-corecoloured-core
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/CmdLineParser.hs2
-rw-r--r--compiler/main/DynFlags.hs8
-rw-r--r--compiler/main/ErrUtils.lhs3
3 files changed, 7 insertions, 6 deletions
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs
index 67515e53a1..372bd3507e 100644
--- a/compiler/main/CmdLineParser.hs
+++ b/compiler/main/CmdLineParser.hs
@@ -233,5 +233,5 @@ missingArgErr f = Left ("missing argument for flag: " ++ f)
errorsToGhcException :: [Located String] -> GhcException
errorsToGhcException errs =
let errors = vcat [ ppr l <> text ": " <> text e | L l e <- errs ]
- in UsageError (showSDoc $ withPprStyle cmdlineParserStyle errors)
+ in UsageError (renderWithStyle errors cmdlineParserStyle)
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 2f3e9f41fe..e405aea4fe 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -804,12 +804,12 @@ defaultDynFlags mySettings =
log_action = \severity srcSpan style msg ->
case severity of
- SevOutput -> printOutput (msg style)
- SevInfo -> printErrs (msg style)
- SevFatal -> printErrs (msg style)
+ SevOutput -> printSDoc msg style
+ SevInfo -> printErrs msg style
+ SevFatal -> printErrs msg style
_ -> do
hPutChar stderr '\n'
- printErrs ((mkLocMessage srcSpan msg) style)
+ printErrs (mkLocMessage srcSpan msg) style
-- careful (#2302): printErrs prints in UTF-8, whereas
-- converting to string first and using hPutStr would
-- just emit the low 8 bits of each unicode char.
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs
index d0a8a862a4..b6297a2d6d 100644
--- a/compiler/main/ErrUtils.lhs
+++ b/compiler/main/ErrUtils.lhs
@@ -67,7 +67,8 @@ mkLocMessage locn msg
-- 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
-- -----------------------------------------------------------------------------