From: simonmar Date: Wed, 27 Jun 2001 16:34:55 +0000 (+0000) Subject: [project @ 2001-06-27 16:34:55 by simonmar] X-Git-Tag: Approximately_9120_patches~1684 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=7d4e5c1a5010838489f29d663618d0b74ec0cb1d;p=ghc-hetmet.git [project @ 2001-06-27 16:34:55 by simonmar] Allow a module to be found on the package path only, by adding findPackageModule :: ModuleName -> IO (Maybe (Module,ModuleLocation)) --- diff --git a/ghc/compiler/main/Finder.lhs b/ghc/compiler/main/Finder.lhs index 2322db9..74b243a 100644 --- a/ghc/compiler/main/Finder.lhs +++ b/ghc/compiler/main/Finder.lhs @@ -7,6 +7,7 @@ module Finder ( initFinder, -- :: [PackageConfig] -> IO (), findModule, -- :: ModuleName -> IO (Maybe (Module, ModuleLocation)) + findPackageModule, -- :: ModuleName -> IO (Maybe (Module, ModuleLocation)) mkHomeModuleLocn, -- :: ModuleName -> String -> Maybe FilePath -- -> IO ModuleLocation emptyHomeDirCache, -- :: IO () @@ -52,7 +53,7 @@ findModule name = do { j <- maybeHomeModule name ; case j of Just home_module -> return (Just home_module) - Nothing -> maybePackageModule name + Nothing -> findPackageModule name } maybeHomeModule :: ModuleName -> IO (Maybe (Module, ModuleLocation)) @@ -139,8 +140,8 @@ mkHomeModuleLocn mod_name basename maybe_source_fn = do )) -maybePackageModule :: ModuleName -> IO (Maybe (Module, ModuleLocation)) -maybePackageModule mod_name = do +findPackageModule :: ModuleName -> IO (Maybe (Module, ModuleLocation)) +findPackageModule mod_name = do pkgs <- getPackageInfo -- hi-suffix for packages depends on the build tag.