Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
e164999e
Commit
e164999e
authored
May 23, 2005
by
simonpj
Browse files
[project @ 2005-05-23 09:56:03 by simonpj]
Track new semantics of splitLongestPrefix; fixes -main-is bug
parent
9af07e05
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/main/DynFlags.hs
View file @
e164999e
...
...
@@ -65,7 +65,7 @@ import Data.List ( isPrefixOf )
#
endif
import
Maybe
(
fromJust
)
import
Char
(
isDigit
,
isUpper
)
import
Outputable
-- -----------------------------------------------------------------------------
-- DynFlags
...
...
@@ -1043,18 +1043,17 @@ setOptLevel n dflags
setMainIs
::
String
->
DynP
()
setMainIs
arg
|
not
(
null
main_
mod
)
-- The arg looked like "Foo.baz"
|
not
(
null
main_
fn
)
-- The arg looked like "Foo.baz"
=
upd
$
\
d
->
d
{
mainFunIs
=
Just
main_fn
,
mainModIs
=
Just
main_mod
}
|
isUpper
(
head
main_
fn
)
-- The arg looked like "Foo"
=
upd
$
\
d
->
d
{
mainModIs
=
Just
main_
fn
}
|
isUpper
(
head
main_
mod
)
-- The arg looked like "Foo"
=
upd
$
\
d
->
d
{
mainModIs
=
Just
main_
mod
}
|
otherwise
-- The arg looked like "baz"
=
upd
$
\
d
->
d
{
mainFunIs
=
Just
main_
fn
}
=
upd
$
\
d
->
d
{
mainFunIs
=
Just
main_
mod
}
where
(
main_mod
,
main_fn
)
=
splitLongestPrefix
arg
(
==
'.'
)
-----------------------------------------------------------------------------
-- Paths & Libraries
...
...
Write
Preview
Markdown
is supported
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