Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b774e696
Commit
b774e696
authored
Jan 19, 2008
by
Ian Lynagh
Browse files
Fix giving an error if we are given conflicting mode flags
parent
c24bd1bb
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/main/Main.hs
View file @
b774e696
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment