[project @ 2003-06-23 10:13:03 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / Main.hs
index 9250df0..c4670a3 100644 (file)
@@ -1,7 +1,7 @@
 {-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
 
 -----------------------------------------------------------------------------
--- $Id: Main.hs,v 1.124 2003/06/04 15:47:59 simonmar Exp $
+-- $Id: Main.hs,v 1.126 2003/06/17 23:26:30 sof Exp $
 --
 -- GHC Driver program
 --
@@ -25,7 +25,8 @@ import InteractiveUI( ghciWelcomeMsg, interactiveUI )
 import CompManager     ( cmInit, cmLoadModules, cmDepAnal )
 import HscTypes                ( GhciMode(..) )
 import Config          ( cBooterVersion, cGhcUnregisterised, cProjectVersion )
-import SysTools                ( getPackageConfigPath, initSysTools, cleanTempFiles )
+import SysTools                ( getPackageConfigPath, initSysTools, cleanTempFiles,
+                         normalisePath )
 import Packages                ( showPackages, getPackageConfigMap, basePackage,
                          haskell98Package
                        )
@@ -218,7 +219,11 @@ main =
                          || looksLikeModuleName m
                          || '.' `notElem` m
 
-    (srcs, objs) = partition looks_like_an_input fileish_args
+     -- To simplify the handling of filepaths, we normalise all filepaths right 
+     -- away - e.g., for win32 platforms, backslashes are converted
+     -- into forward slashes.
+    normal_fileish_paths = map normalisePath fileish_args
+    (srcs, objs)         = partition looks_like_an_input normal_fileish_paths
 
    mapM_ (add v_Ld_inputs) objs