diff options
author | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 13:06:58 +0000 |
---|---|---|
committer | Thomas Schilling <nominolo@googlemail.com> | 2008-11-22 13:06:58 +0000 |
commit | 1246293616fc45787ecaed13aa31a2555510f7e3 (patch) | |
tree | 2b05b8e556c8c43738e13227bd1191266f7fbca8 /compiler/ghci/InteractiveUI.hs | |
parent | 348370462d762e64354ac430b4f973fcf1cb71dc (diff) | |
download | haskell-1246293616fc45787ecaed13aa31a2555510f7e3.tar.gz |
Change 'handleFlagWarnings' to throw exceptions instead of dying.
It now uses the standard warning log and error reporting mechanism.
Diffstat (limited to 'compiler/ghci/InteractiveUI.hs')
-rw-r--r-- | compiler/ghci/InteractiveUI.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 059d692df6..4741a618b1 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -34,7 +34,8 @@ import PackageConfig import UniqFM #endif -import HscTypes ( implicitTyThings, reflectGhc, reifyGhc ) +import HscTypes ( implicitTyThings, reflectGhc, reifyGhc + , handleFlagWarnings ) import qualified RdrName ( getGRE_NameQualifier_maybes ) -- should this come via GHC? import Outputable hiding (printForUser, printForUserPartWay) import Module -- for ModuleEnv @@ -42,7 +43,6 @@ import Name import SrcLoc -- Other random utilities -import ErrUtils import CmdLineParser import Digraph import BasicTypes hiding (isTopLevel) @@ -1512,7 +1512,7 @@ newDynFlags minus_opts = do dflags <- getDynFlags let pkg_flags = packageFlags dflags (dflags', leftovers, warns) <- io $ GHC.parseDynamicFlags dflags $ map noLoc minus_opts - io $ handleFlagWarnings dflags' warns + handleFlagWarnings dflags' warns if (not (null leftovers)) then ghcError $ errorsToGhcException leftovers |