diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-14 00:10:19 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2016-06-18 12:46:05 +0200 |
commit | e02beb1849416f5af8ec56acd17f37b5dc7c24a4 (patch) | |
tree | 123025307704c72dbed0a92c6703118c64591c66 /ghc/Main.hs | |
parent | 9bb05785a7ac3ea8d2589173505891e75163d66b (diff) | |
download | haskell-e02beb1849416f5af8ec56acd17f37b5dc7c24a4.tar.gz |
Driver: `ghc ../Test` (without file extension) should work
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2331
GHC Trac Issues: #12192
Diffstat (limited to 'ghc/Main.hs')
-rw-r--r-- | ghc/Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs index 1a6cbebe3c..4870ce4d22 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -306,7 +306,7 @@ partition_args (arg:args) srcs objs 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 + - and finally we consider everything without an extension to be a comp manager input, as shorthand for a .hs or .lhs filename. Everything else is considered to be a linker object, and passed @@ -316,7 +316,7 @@ looks_like_an_input :: String -> Bool looks_like_an_input m = isSourceFilename m || looksLikeModuleName m || "-" `isPrefixOf` m - || '.' `notElem` m + || not (hasExtension m) -- ----------------------------------------------------------------------------- -- Option sanity checks |