Commit 0fd5c83d authored by simonmar's avatar simonmar
Browse files

[project @ 2005-06-22 08:25:38 by simonmar]

pkgIdMap should include adjustments made by -package flags (it used
to; I broke this yesterday).  Also add origPkgIdMap for keeping the
original package database - this might be needed in the future.
parent 69e62273
......@@ -138,11 +138,16 @@ data PackageState = PackageState {
-- should be in reverse dependency order; that is, a package
-- is always mentioned before the packages it depends on.
origPkgIdMap :: PackageConfigMap, -- PackageId -> PackageConfig
-- the full package database
pkgIdMap :: PackageConfigMap, -- PackageId -> PackageConfig
-- mapping derived from the package databases and
-- command-line package flags.
-- Derived from origPkgIdMap.
-- The exposed flags are adjusted according to -package and
-- -hide-package flags, and -ignore-package removes packages.
moduleToPkgConfAll :: ModuleEnv [(PackageConfig,Bool)],
-- Derived from pkgIdMap.
-- Maps Module to (pkgconf,exposed), where pkgconf is the
-- PackageConfig for the package containing the module, and
-- exposed is True if the package exposes that module.
......@@ -364,10 +369,11 @@ mkPackageState dflags orig_pkg_db = do
-- Discover any conflicts at the same time, and factor in the new exposed
-- status of each package.
let mod_map = mkModuleMap orig_pkg_db dep_exposed
let mod_map = mkModuleMap pkg_db dep_exposed
return PackageState{ explicitPackages = dep_explicit,
pkgIdMap = orig_pkg_db,
origPkgIdMap = orig_pkg_db,
pkgIdMap = pkg_db,
moduleToPkgConfAll = mod_map,
basePackageId = basePackageId,
rtsPackageId = rtsPackageId,
Supports Markdown
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