summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-01-15 17:48:30 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-01-31 02:46:15 -0500
commit29c701c154cafa4844cf3c1bd4a93cacfa6b1ee1 (patch)
tree88a060f43c73306463510b53607c1fd9460bd84b /utils
parentbf38a20eefcaaaac404a1818c3eff8273dc67dd9 (diff)
downloadhaskell-29c701c154cafa4844cf3c1bd4a93cacfa6b1ee1.tar.gz
Refactor package related code
The package terminology is a bit of a mess. Cabal packages contain components. Instances of these components when built with some flags/options/dependencies are called units. Units are registered into package databases and their metadata are called PackageConfig. GHC only knows about package databases containing units. It is a sad mismatch not fixed by this patch (we would have to rename parameters such as `package-id <unit-id>` which would affect users). This patch however fixes the following internal names: - Renames PackageConfig into UnitInfo. - Rename systemPackageConfig into globalPackageDatabase[Path] - Rename PkgConfXX into PkgDbXX - Rename pkgIdMap into unitIdMap - Rename ModuleToPkgDbAll into ModuleNameProvidersMap - Rename lookupPackage into lookupUnit - Add comments on DynFlags package related fields It also introduces a new `PackageDatabase` datatype instead of explicitly passing the following tuple: `(FilePath,[PackageConfig])`. The `pkgDatabase` field in `DynFlags` now contains the unit info for each unit of each package database exactly as they have been read from disk. Previously the command-line flag `-distrust-all-packages` would modify these unit info. Now this flag only affects the "dynamic" consolidated package state found in `pkgState` field. It makes sense because `initPackages` could be called first with this `distrust-all-packages` flag set and then again (using ghc-api) without and it should work (package databases are not read again from disk when `initPackages` is called the second time). Bump haddock submodule
Diffstat (limited to 'utils')
m---------utils/haddock0
1 files changed, 0 insertions, 0 deletions
diff --git a/utils/haddock b/utils/haddock
-Subproject e2c0a757f5aae215d89e464a7e45f9777c27c8f
+Subproject 4808003d2238f76aee96d22cc022cee3e049f6a