summaryrefslogtreecommitdiff
path: root/ghc/Main.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-06-11 17:25:08 +0100
committerIan Lynagh <igloo@earth.li>2012-06-11 17:25:08 +0100
commitfa362ab59b9c17afcbd71318cffc873ea224449e (patch)
tree241672fc4acd560bb32433bd3221964bbcc095fc /ghc/Main.hs
parentdff06f8e0ec0cd7a7d88e4d0f114661cfca95b81 (diff)
downloadhaskell-fa362ab59b9c17afcbd71318cffc873ea224449e.tar.gz
Change how pprPanic works
We now include the String and the SDoc in the exception, and don't flatten them into a String until near the top-level
Diffstat (limited to 'ghc/Main.hs')
-rw-r--r--ghc/Main.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index a8202f2853..ce4c62822f 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -78,6 +78,7 @@ import Data.Maybe
main :: IO ()
main = do
hSetBuffering stdout NoBuffering
+ hSetBuffering stderr NoBuffering
GHC.defaultErrorHandler defaultLogAction defaultFlushOut $ do
-- 1. extract the -B flag from the args
argv0 <- getArgs
@@ -166,6 +167,8 @@ main' postLoadMode dflags0 args flagWarnings = do
-- Leftover ones are presumably files
(dflags2, fileish_args, dynamicFlagWarnings) <- GHC.parseDynamicFlags dflags1a args
+ GHC.prettyPrintGhcErrors $ do
+
let flagWarnings' = flagWarnings ++ dynamicFlagWarnings
handleSourceError (\e -> do