summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-02-24 22:49:14 +0000
committerIan Lynagh <igloo@earth.li>2012-02-24 22:49:14 +0000
commit4c5464f903534fd70d68c5370bf8b6ff528d3fd0 (patch)
tree4a7b35b9f239487c8e9b8455a2a3886ae99c8c09 /utils
parent778ca5de01f1f6622101317eed0d5befcfba0c46 (diff)
downloadhaskell-4c5464f903534fd70d68c5370bf8b6ff528d3fd0.tar.gz
Abstract out the hFlush calls in the GHC API
stdout/stderr might be closed, so we can't just hFlush them. So we instead allow configuration in the same way that log_action is configurable.
Diffstat (limited to 'utils')
-rw-r--r--utils/ghctags/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs
index c0e51802a1..ea3300c66a 100644
--- a/utils/ghctags/Main.hs
+++ b/utils/ghctags/Main.hs
@@ -11,7 +11,7 @@ import HscTypes ( msHsFilePath )
import Name ( getOccString )
--import ErrUtils ( printBagOfErrors )
import Panic ( panic )
-import DynFlags ( defaultLogAction )
+import DynFlags ( defaultLogAction, defaultFlushOut )
import Bag
import Exception
import FastString
@@ -102,7 +102,7 @@ main = do
then Just `liftM` openFile "TAGS" openFileMode
else return Nothing
- GHC.defaultErrorHandler defaultLogAction $
+ GHC.defaultErrorHandler defaultLogAction defaultFlushOut $
runGhc (Just ghc_topdir) $ do
--liftIO $ print "starting up session"
dflags <- getSessionDynFlags