summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-08-08 14:25:42 +0000
committerIan Lynagh <igloo@earth.li>2010-08-08 14:25:42 +0000
commit10c4d1944f27aa7dc939ccb7e17e780602bdc47d (patch)
tree0e1f4e15dc07c25a9af5edecd7964d5a5c90c9fd /compiler/main
parentd97079816522f4ac4add574c15b56961aceb036e (diff)
downloadhaskell-10c4d1944f27aa7dc939ccb7e17e780602bdc47d.tar.gz
Send ghc progress output to stdout; fixes #3636
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DynFlags.hs7
-rw-r--r--compiler/main/ErrUtils.lhs5
-rw-r--r--compiler/main/ErrUtils.lhs-boot3
3 files changed, 9 insertions, 6 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 2971aa11ca..ccf50500f4 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -742,9 +742,10 @@ defaultDynFlags =
log_action = \severity srcSpan style msg ->
case severity of
- SevInfo -> printErrs (msg style)
- SevFatal -> printErrs (msg style)
- _ -> do
+ SevOutput -> printOutput (msg style)
+ SevInfo -> printErrs (msg style)
+ SevFatal -> printErrs (msg style)
+ _ -> do
hPutChar stderr '\n'
printErrs ((mkLocMessage srcSpan msg) style)
-- careful (#2302): printErrs prints in UTF-8, whereas
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs
index f1328e0da7..3ab89bd733 100644
--- a/compiler/main/ErrUtils.lhs
+++ b/compiler/main/ErrUtils.lhs
@@ -53,7 +53,8 @@ pprMessageBag :: Bag Message -> SDoc
pprMessageBag msgs = vcat (punctuate blankLine (bagToList msgs))
data Severity
- = SevInfo
+ = SevOutput
+ | SevInfo
| SevWarning
| SevError
| SevFatal
@@ -310,7 +311,7 @@ fatalErrorMsg dflags msg = log_action dflags SevFatal noSrcSpan defaultErrStyle
compilationProgressMsg :: DynFlags -> String -> IO ()
compilationProgressMsg dflags msg
- = ifVerbose dflags 1 (log_action dflags SevInfo noSrcSpan defaultUserStyle (text msg))
+ = ifVerbose dflags 1 (log_action dflags SevOutput noSrcSpan defaultUserStyle (text msg))
showPass :: DynFlags -> String -> IO ()
showPass dflags what
diff --git a/compiler/main/ErrUtils.lhs-boot b/compiler/main/ErrUtils.lhs-boot
index 77d6cfdb4a..a4e1cab76b 100644
--- a/compiler/main/ErrUtils.lhs-boot
+++ b/compiler/main/ErrUtils.lhs-boot
@@ -5,7 +5,8 @@ import Outputable (SDoc)
import SrcLoc (SrcSpan)
data Severity
- = SevInfo
+ = SevOutput
+ | SevInfo
| SevWarning
| SevError
| SevFatal