summaryrefslogtreecommitdiff
path: root/ghc/compiler/main/Main.hs
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-05-17 07:49:47 +0000
committersimonmar <unknown>2005-05-17 07:49:47 +0000
commitb59217601ccb7dce4206a65599be0cecbdd5545c (patch)
tree16eb588ca0521d2775c50c252d58ec0181868e97 /ghc/compiler/main/Main.hs
parenta0ec80fb1ee03b3653848a852b950ed46eba9f4e (diff)
downloadhaskell-b59217601ccb7dce4206a65599be0cecbdd5545c.tar.gz
[project @ 2005-05-17 07:49:47 by simonmar]
Bugfix to previous commit: filenames without an extension are assumed to be a haskell source filenames with the extension removed (eg. ghc --make hello should compile hello.hs).
Diffstat (limited to 'ghc/compiler/main/Main.hs')
-rw-r--r--ghc/compiler/main/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ghc/compiler/main/Main.hs b/ghc/compiler/main/Main.hs
index 422cfc9ff0..0e9711f78b 100644
--- a/ghc/compiler/main/Main.hs
+++ b/ghc/compiler/main/Main.hs
@@ -372,7 +372,8 @@ doMake sess [] = throwDyn (UsageError "no input files")
doMake sess srcs = do
let (hs_srcs, non_hs_srcs) = partition haskellish srcs
- haskellish (f,Nothing) = looksLikeModuleName f || isHaskellSrcFilename f
+ haskellish (f,Nothing) =
+ looksLikeModuleName f || isHaskellSrcFilename f || '.' `notElem` f
haskellish (f,Just phase) =
phase `notElem` [As, Cc, CmmCpp, Cmm, StopLn]