diff options
author | Ian Lynagh <igloo@earth.li> | 2008-08-26 18:56:41 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2008-08-26 18:56:41 +0000 |
commit | fc9bbbab3fe56cf0ff5723abbdb0f496d257f34e (patch) | |
tree | a33e6fa419a82c77d00c841f5eedd684a661bcc6 /compiler/ghci | |
parent | 54280054ee1848698d4462ff8f85f3b46bf0a26d (diff) | |
download | haskell-fc9bbbab3fe56cf0ff5723abbdb0f496d257f34e.tar.gz |
Give locations of flag warnings/errors
Diffstat (limited to 'compiler/ghci')
-rw-r--r-- | compiler/ghci/InteractiveUI.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index 6f9c2248be..48033ae709 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -42,6 +42,7 @@ import SrcLoc -- Other random utilities import ErrUtils +import CmdLineParser import Digraph import BasicTypes hiding (isTopLevel) import Panic hiding (showException) @@ -1503,13 +1504,12 @@ newDynFlags :: [String] -> GHCi () newDynFlags minus_opts = do dflags <- getDynFlags let pkg_flags = packageFlags dflags - (dflags', leftovers, warns) <- io $ GHC.parseDynamicFlags dflags minus_opts + (dflags', leftovers, warns) <- io $ GHC.parseDynamicFlags dflags $ map noLoc minus_opts io $ handleFlagWarnings dflags' warns if (not (null leftovers)) - then ghcError (CmdLineError ("unrecognised flags: " ++ - unwords leftovers)) - else return () + then ghcError $ errorsToGhcException leftovers + else return () new_pkgs <- setDynFlags dflags' |