Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/93299cce9a4f7bc65b8164f779a37ef7f9f7c4a0 >--------------------------------------------------------------- commit 93299cce9a4f7bc65b8164f779a37ef7f9f7c4a0 Author: Simon Marlow <[email protected]> Date: Tue Mar 13 11:30:13 2012 +0000 Tweak to flag parsing (#5921) -o2/Main.exe should be an invalid flag, not a linker input >--------------------------------------------------------------- ghc/Main.hs | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ghc/Main.hs b/ghc/Main.hs index 204c54f..a8202f2 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -255,6 +255,10 @@ partition_args (arg:args) srcs objs - module names (not forgetting hierarchical module names), + - things beginning with '-' are flags that were not recognised by + the flag parser, and we want them to generate errors later in + checkOptions, so we class them as source files (#5921) + - and finally we consider everything not containing a '.' to be a comp manager input, as shorthand for a .hs or .lhs filename. @@ -264,6 +268,7 @@ partition_args (arg:args) srcs objs looks_like_an_input :: String -> Bool looks_like_an_input m = isSourceFilename m || looksLikeModuleName m + || "-" `isPrefixOf` m || '.' `notElem` m -- ----------------------------------------------------------------------------- _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
