projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d970798
)
Send ghc progress output to stdout; fixes #3636
author
Ian Lynagh
<igloo@earth.li>
Sun, 8 Aug 2010 14:25:42 +0000
(14:25 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sun, 8 Aug 2010 14:25:42 +0000
(14:25 +0000)
compiler/main/DynFlags.hs
patch
|
blob
|
history
compiler/main/ErrUtils.lhs
patch
|
blob
|
history
compiler/main/ErrUtils.lhs-boot
patch
|
blob
|
history
compiler/utils/Outputable.lhs
patch
|
blob
|
history
diff --git
a/compiler/main/DynFlags.hs
b/compiler/main/DynFlags.hs
index
2971aa1
..
ccf5050
100644
(file)
--- a/
compiler/main/DynFlags.hs
+++ b/
compiler/main/DynFlags.hs
@@
-742,9
+742,10
@@
defaultDynFlags =
log_action = \severity srcSpan style msg ->
case severity of
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
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
f1328e0
..
3ab89bd
100644
(file)
--- 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
pprMessageBag msgs = vcat (punctuate blankLine (bagToList msgs))
data Severity
- = SevInfo
+ = SevOutput
+ | SevInfo
| SevWarning
| SevError
| SevFatal
| SevWarning
| SevError
| SevFatal
@@
-310,7
+311,7
@@
fatalErrorMsg dflags msg = log_action dflags SevFatal noSrcSpan defaultErrStyle
compilationProgressMsg :: DynFlags -> String -> IO ()
compilationProgressMsg dflags msg
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
showPass :: DynFlags -> String -> IO ()
showPass dflags what
diff --git
a/compiler/main/ErrUtils.lhs-boot
b/compiler/main/ErrUtils.lhs-boot
index
77d6cfd
..
a4e1cab
100644
(file)
--- a/
compiler/main/ErrUtils.lhs-boot
+++ b/
compiler/main/ErrUtils.lhs-boot
@@
-5,7
+5,8
@@
import Outputable (SDoc)
import SrcLoc (SrcSpan)
data Severity
import SrcLoc (SrcSpan)
data Severity
- = SevInfo
+ = SevOutput
+ | SevInfo
| SevWarning
| SevError
| SevFatal
| SevWarning
| SevError
| SevFatal
diff --git
a/compiler/utils/Outputable.lhs
b/compiler/utils/Outputable.lhs
index
ba61a08
..
c6ba81c
100644
(file)
--- a/
compiler/utils/Outputable.lhs
+++ b/
compiler/utils/Outputable.lhs
@@
-34,7
+34,7
@@
module Outputable (
speakNth, speakNTimes, speakN, speakNOf, plural,
-- * Converting 'SDoc' into strings and outputing it
speakNth, speakNTimes, speakN, speakNOf, plural,
-- * Converting 'SDoc' into strings and outputing it
- printSDoc, printErrs, hPrintDump, printDump,
+ printSDoc, printErrs, printOutput, hPrintDump, printDump,
printForC, printForAsm, printForUser, printForUserPartWay,
pprCode, mkCodeStyle,
showSDoc, showSDocOneLine,
printForC, printForAsm, printForUser, printForUserPartWay,
pprCode, mkCodeStyle,
showSDoc, showSDocOneLine,
@@
-287,6
+287,9
@@
printErrs :: Doc -> IO ()
printErrs doc = do Pretty.printDoc PageMode stderr doc
hFlush stderr
printErrs doc = do Pretty.printDoc PageMode stderr doc
hFlush stderr
+printOutput :: Doc -> IO ()
+printOutput doc = Pretty.printDoc PageMode stdout doc
+
printDump :: SDoc -> IO ()
printDump doc = hPrintDump stdout doc
printDump :: SDoc -> IO ()
printDump doc = hPrintDump stdout doc