diff options
Diffstat (limited to 'compiler/GHC/Runtime/Linker.hs')
-rw-r--r-- | compiler/GHC/Runtime/Linker.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Runtime/Linker.hs b/compiler/GHC/Runtime/Linker.hs index 10f18a8525..48ce94a710 100644 --- a/compiler/GHC/Runtime/Linker.hs +++ b/compiler/GHC/Runtime/Linker.hs @@ -1248,6 +1248,7 @@ linkPackages' hsc_env new_pks pls = do return $! pls { pkgs_loaded = pkgs' } where dflags = hsc_dflags hsc_env + pkgstate = pkgState dflags link :: [LinkerUnitId] -> [LinkerUnitId] -> IO [LinkerUnitId] link pkgs new_pkgs = @@ -1257,7 +1258,7 @@ linkPackages' hsc_env new_pks pls = do | new_pkg `elem` pkgs -- Already linked = return pkgs - | Just pkg_cfg <- lookupInstalledPackage dflags new_pkg + | Just pkg_cfg <- lookupInstalledPackage pkgstate new_pkg = do { -- Link dependents first pkgs' <- link pkgs (depends pkg_cfg) -- Now link the package itself |