import SrcLoc
-- Other random utilities
+import ErrUtils
import Digraph
import BasicTypes hiding (isTopLevel)
import Panic hiding (showException)
| otherwise = text " " <> text "-fno-" <> text str
(ghciFlags,others) = partition (\(_,f)->f `elem` flags)
DynFlags.fFlags
- nonLanguageDynFlags = filter (\(_,f)->not $ f `elem` map snd xFlags)
- others
+ nonLanguageDynFlags = filterOut (\(_,f) -> f `elem` languageOptions)
+ others
flags = [Opt_PrintExplicitForalls
,Opt_PrintBindResult
,Opt_BreakOnException
newDynFlags minus_opts = do
dflags <- getDynFlags
let pkg_flags = packageFlags dflags
- (dflags',leftovers) <- io $ GHC.parseDynamicFlags dflags minus_opts
+ (dflags', leftovers, warns) <- io $ GHC.parseDynamicFlags dflags minus_opts
+ io $ handleFlagWarnings dflags' warns
if (not (null leftovers))
then throwDyn (CmdLineError ("unrecognised flags: " ++
dflags <- getDynFlags
io $ putStrLn $ showSDoc $ vcat $
text "active language flags:" :
- [text (" -X" ++ str) | (str,f) <- DynFlags.xFlags, dopt f dflags]
+ [text (" -X" ++ str) | (str, f, _) <- DynFlags.xFlags, dopt f dflags]
-- -----------------------------------------------------------------------------
-- Completion