diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-09-03 11:58:48 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-09-03 11:58:48 +0100 |
commit | 494eb3dc2bdbe76170044631b98884c56e9acfd3 (patch) | |
tree | e40c2ade1ff54cdcc42054766f83dc5f4099529b /ghc | |
parent | db5c6adc0c39a9ea997adca821fc7561afe1d500 (diff) | |
download | haskell-494eb3dc2bdbe76170044631b98884c56e9acfd3.tar.gz |
Refactor the ways code a bit
We used to use a list lookup that couldn't fail. Now we just use
functions.
There were 3 overlapping entries for WayPar; I've commented out the ones
that were shadowed for now.
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 5eda655333..53ca70e296 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -289,12 +289,12 @@ checkOptions mode dflags srcs objs = do let unknown_opts = [ f | (f@('-':_), _) <- srcs ] when (notNull unknown_opts) (unknownFlagsErr unknown_opts) - when (notNull (filter isRTSWay (wayNames dflags)) + when (notNull (filter wayRTSOnly (ways dflags)) && isInterpretiveMode mode) $ hPutStrLn stderr ("Warning: -debug, -threaded and -ticky are ignored by GHCi") -- -prof and --interactive are not a good combination - when (notNull (filter (not . isRTSWay) (wayNames dflags)) + when (notNull (filter (not . wayRTSOnly) (ways dflags)) && isInterpretiveMode mode) $ do ghcError (UsageError "--interactive can't be used with -prof or -unreg.") |