From 74a7a2645c2399155a11503e0d558f921d0c7f36 Mon Sep 17 00:00:00 2001 From: sof Date: Fri, 8 Jun 2001 18:59:11 +0000 Subject: [PATCH] [project @ 2001-06-08 18:59:11 by sof] findOnPackagePath: return file-path not directory --- ghc/compiler/main/Finder.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index b208867..6cb1fc9 100644 --- a/ghc/compiler/main/Finder.lhs +++ b/ghc/compiler/main/Finder.lhs @@ -160,7 +160,7 @@ maybePackageModule mod_name = do found <- findOnPackagePath pkgs hi case found of Nothing -> return Nothing - Just (pkg_name,path) -> + Just (pkg_name,path) -> return (Just (mkModule mod_name pkg_name, ModuleLocation{ ml_hspp_file = Nothing, @@ -178,8 +178,8 @@ findOnPackagePath pkgs file = loop pkgs loop (p:ps) = do found <- findOnPath (import_dirs p) file case found of - Nothing -> loop ps - Just f -> return (Just (mkFastString (name p), f)) + Nothing -> loop ps + Just path -> return (Just (mkFastString (name p), path ++ '/':file)) findOnPath :: [String] -> String -> IO (Maybe FilePath) findOnPath path s = loop path -- 1.7.10.4