diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-12 11:40:03 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-13 02:13:02 -0400 |
commit | e7272d53e67e72580caceae40e766c4bfeb1c398 (patch) | |
tree | 5e0d06cf3fc31e737ea385b53efe22e5916e847a /compiler/GHC/Runtime | |
parent | f6be6e432e53108075905c1fc7785d8b1f18a33f (diff) | |
download | haskell-e7272d53e67e72580caceae40e766c4bfeb1c398.tar.gz |
Enhance UnitId use
* use UnitId instead of String to identify wired-in units
* use UnitId instead of Unit in the backend (Unit are only use by
Backpack to produce type-checked interfaces, not real code)
* rename lookup functions for consistency
* documentation
Diffstat (limited to 'compiler/GHC/Runtime')
-rw-r--r-- | compiler/GHC/Runtime/Linker.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Runtime/Linker.hs b/compiler/GHC/Runtime/Linker.hs index 22cd871fad..e45fce9bcc 100644 --- a/compiler/GHC/Runtime/Linker.hs +++ b/compiler/GHC/Runtime/Linker.hs @@ -143,7 +143,7 @@ emptyPLS = PersistentLinkerState -- -- The linker's symbol table is populated with RTS symbols using an -- explicit list. See rts/Linker.c for details. - where init_pkgs = map toUnitId [rtsUnitId] + where init_pkgs = [rtsUnitId] extendLoadedPkgs :: DynLinker -> [UnitId] -> IO () extendLoadedPkgs dl pkgs = @@ -1261,7 +1261,7 @@ linkPackages' hsc_env new_pks pls = do | new_pkg `elem` pkgs -- Already linked = return pkgs - | Just pkg_cfg <- lookupInstalledPackage pkgstate new_pkg + | Just pkg_cfg <- lookupUnitId pkgstate new_pkg = do { -- Link dependents first pkgs' <- link pkgs (unitDepends pkg_cfg) -- Now link the package itself |