[project @ 2001-06-13 10:23:23 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / DriverState.hs
index aff192f..8cad99c 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverState.hs,v 1.40 2001/05/28 03:31:19 sof Exp $
+-- $Id: DriverState.hs,v 1.43 2001/06/13 10:23:23 simonmar Exp $
 --
 -- Settings for the driver
 --
@@ -98,6 +98,7 @@ GLOBAL_VAR(v_Output_hi,   Nothing, Maybe String)
 
 GLOBAL_VAR(v_Object_suf,  Nothing, Maybe String)
 GLOBAL_VAR(v_HC_suf,     Nothing, Maybe String)
+GLOBAL_VAR(v_Hi_dir,      Nothing, Maybe String)
 GLOBAL_VAR(v_Hi_suf,      "hi",           String)
 
 GLOBAL_VAR(v_Ld_inputs,        [],      [String])
@@ -345,7 +346,7 @@ addPackage package
 getPackageImportPath   :: IO [String]
 getPackageImportPath = do
   ps <- getPackageInfo
-  return (nub (concat (map import_dirs ps)))
+  return (nub (filter (not.null) (concatMap import_dirs ps)))
 
 getPackageIncludePath   :: IO [String]
 getPackageIncludePath = do
@@ -361,7 +362,7 @@ getPackageCIncludes = do
 getPackageLibraryPath  :: IO [String]
 getPackageLibraryPath = do
   ps <- getPackageInfo
-  return (nub (concat (map library_dirs ps)))
+  return (nub (filter (not.null) (concatMap library_dirs ps)))
 
 getPackageLibraries    :: IO [String]
 getPackageLibraries = do
@@ -404,6 +405,7 @@ lookupPkg nm ps
    = case [p | p <- ps, name p == nm] of
         []    -> Nothing
         (p:_) -> Just p
+
 -----------------------------------------------------------------------------
 -- Ways