From 7d4e5c1a5010838489f29d663618d0b74ec0cb1d Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 27 Jun 2001 16:34:55 +0000 Subject: [PATCH] [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)) --- ghc/compiler/main/Finder.lhs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- 1.7.10.4