Commit b774e696 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix giving an error if we are given conflicting mode flags

parent c24bd1bb
......@@ -397,10 +397,10 @@ mode_flags =
setMode :: CmdLineMode -> String -> ModeM ()
setMode m flag = do
(old_mode, old_flag, flags) <- getCmdLineState
when (notNull old_flag && flag /= old_flag) $
throwDyn (UsageError
if notNull old_flag && flag /= old_flag
then throwDyn (UsageError
("cannot use `" ++ old_flag ++ "' with `" ++ flag ++ "'"))
putCmdLineState (m, flag, flags)
else putCmdLineState (m, flag, flags)
addFlag :: String -> ModeM ()
addFlag s = do
......
Supports Markdown
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