diff options
author | Ian Lynagh <igloo@earth.li> | 2012-06-11 20:58:33 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-06-11 20:58:33 +0100 |
commit | 5716a2f849a53c48f6171101fed7a473107f0756 (patch) | |
tree | 4976930751c8ce9ea1dad166cce126ce282ab8b8 /utils | |
parent | 65152943e6fe80dc5314e897dbf910137b01c47b (diff) | |
download | haskell-5716a2f849a53c48f6171101fed7a473107f0756.tar.gz |
Pass DynFlags to the LogAction
A side-effect is that we can no longer use the LogAction in
defaultErrorHandler, as we don't have DynFlags at that point.
But all that defaultErrorHandler did is to print Strings as
SevFatal, so now it takes a 'FatalMessager' instead.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ghctags/Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ghctags/Main.hs b/utils/ghctags/Main.hs index f63e039f39..3c7e216345 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, defaultFlushOut ) +import DynFlags ( defaultFatalMessager, defaultFlushOut ) import Bag import Exception import FastString @@ -105,7 +105,7 @@ main = do then Just `liftM` openFile "TAGS" openFileMode else return Nothing - GHC.defaultErrorHandler defaultLogAction defaultFlushOut $ + GHC.defaultErrorHandler defaultFatalMessager defaultFlushOut $ runGhc (Just ghc_topdir) $ do --liftIO $ print "starting up session" dflags <- getSessionDynFlags |