Commit 7d4e5c1a authored by simonmar's avatar simonmar
Browse files

[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))
parent e25c9d5e
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment