[project @ 2005-01-12 13:36:30 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverFlags.hs
index 2787040..6d24d53 100644 (file)
@@ -543,7 +543,9 @@ ignorePackage p =
 
 -- -i on its own deletes the import paths
 addImportPath "" = updDynFlags (\s -> s{importPaths = []})
-addImportPath p  = updDynFlags (\s -> s{importPaths = p : importPaths s})
+addImportPath p  = do
+  paths <- splitPathList p
+  updDynFlags (\s -> s{importPaths = importPaths s ++ paths})
 
 -- we can only switch between HscC, HscAsmm, and HscILX with dynamic flags 
 -- (-fvia-C, -fasm, -filx respectively).