[project @ 2001-03-01 17:07:49 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / Finder.lhs
index 03c2bbe..b3f776d 100644 (file)
@@ -95,11 +95,15 @@ maybeHomeModule mod_name = do
        lhs = basename ++ ".lhs"
 
    case lookupFM home_map hs of {
+         -- special case to avoid getting "./foo.hs" all the time
+       Just "."  -> mkHomeModuleLocn mod_name basename hs;
        Just path -> mkHomeModuleLocn mod_name 
                        (path ++ '/':basename) (path ++ '/':hs);
        Nothing ->
 
    case lookupFM home_map lhs of {
+         -- special case to avoid getting "./foo.hs" all the time
+       Just "."  -> mkHomeModuleLocn mod_name basename lhs;
        Just path ->  mkHomeModuleLocn mod_name
                        (path ++ '/':basename) (path ++ '/':lhs);
        Nothing -> do
@@ -163,8 +167,7 @@ newPkgCache pkgs = do
                pkg_name = _PK_ (name pkg)
            let addDir fm dir = do
                    contents <- getDirectoryContents' dir
-                   let clean_contents = filter isUsefulFile contents
-                   return (addListToFM fm (zip clean_contents 
+                   return (addListToFM fm (zip contents 
                                               (repeat (pkg_name,dir))))
            foldM addDir fm dirs