Commit fb57f87a authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX #1155: ghci -debug generates slightly odd message

parent 78d61618
......@@ -223,11 +223,15 @@ checkOptions cli_mode dflags srcs objs = do
let unknown_opts = [ f | (f@('-':_), _) <- srcs ]
when (notNull unknown_opts) (unknownFlagsErr unknown_opts)
when (notNull (filter isRTSWay (wayNames dflags))
&& isInterpretiveMode cli_mode) $
putStrLn ("Warning: -debug, -threaded and -ticky are ignored by GHCi")
-- -prof and --interactive are not a good combination
when (notNull (filter (/= WayThreaded) (wayNames dflags))
when (notNull (filter (not . isRTSWay) (wayNames dflags))
&& isInterpretiveMode cli_mode) $
do throwDyn (UsageError
"--interactive can't be used with -prof, -ticky, or -unreg.")
"--interactive can't be used with -prof or -unreg.")
-- -ohi sanity check
if (isJust (outputHi dflags) &&
(isCompManagerMode cli_mode || srcs `lengthExceeds` 1))
......
......@@ -14,7 +14,7 @@ module StaticFlags (
staticFlags,
-- Ways
WayName(..), v_Ways, v_Build_tag, v_RTS_Build_tag,
WayName(..), v_Ways, v_Build_tag, v_RTS_Build_tag, isRTSWay,
-- Output style options
opt_PprUserLength,
......@@ -512,6 +512,8 @@ lkupWay w =
Nothing -> error "findBuildTag"
Just details -> details
isRTSWay = wayRTSOnly . lkupWay
data Way = Way {
wayTag :: String,
wayRTSOnly :: Bool,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment