X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fmain%2FFinder.lhs;h=6cb1fc9ae1562691c655807e60fb1bb93de83595;hb=ea47b6e651e0e8d441fa934965217954b33643ee;hp=b2088678aa64f00bf2520119ddb18b01c66edb02;hpb=c95b86624e5048b972e8b2a975ee7d09366df3bb;p=ghc-hetmet.git 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