diff options
| author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-03-03 13:05:03 -0800 |
|---|---|---|
| committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2015-03-03 13:05:08 -0800 |
| commit | 6e77d45b2b4dcf189b71621009e80b96a3c5155a (patch) | |
| tree | 387b2d00a84bc6f71bf3225b11c03131f761f8c2 | |
| parent | a0cea7ba9f14a193f31f057371d104c2dc0b7d80 (diff) | |
| download | haskell-6e77d45b2b4dcf189b71621009e80b96a3c5155a.tar.gz | |
Clarify some comments in Packages.hs [skip-ci]
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| -rw-r--r-- | compiler/main/Packages.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs index db48d99bac..42aa0a1d80 100644 --- a/compiler/main/Packages.hs +++ b/compiler/main/Packages.hs @@ -233,9 +233,10 @@ type ModuleToPkgConfAll = data PackageState = PackageState { -- | A mapping of 'PackageKey' to 'PackageConfig'. This list is adjusted - -- so that only valid packages are here. Currently, we also flip the - -- exposed/trusted bits based on package flags; however, the hope is to - -- stop doing that. + -- so that only valid packages are here. 'PackageConfig' reflects + -- what was stored *on disk*, except for the 'trusted' flag, which + -- is adjusted at runtime. (In particular, some packages in this map + -- may have the 'exposed' flag be 'False'.) pkgIdMap :: PackageConfigMap, -- | The packages we're going to link in eagerly. This list @@ -287,7 +288,9 @@ getPackageDetails dflags pid = expectJust "getPackageDetails" (lookupPackage dflags pid) -- | Get a list of entries from the package database. NB: be careful with --- this function, it may not do what you expect it to. +-- this function, although all packages in this map are "visible", this +-- does not imply that the exposed-modules of the package are available +-- (they may have been thinned or renamed). listPackageConfigMap :: DynFlags -> [PackageConfig] listPackageConfigMap dflags = eltsUFM (pkgIdMap (pkgState dflags)) |
