diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-10-03 15:08:24 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-10-03 17:07:36 -0400 |
commit | f3f624aeb1360c1f902930b3cc62346d2e5201c0 (patch) | |
tree | 29ef8e3cc3b0159737eb47137f20e5c84a339cb3 /compiler/main/Packages.hs | |
parent | de1b802b651de5397bb3c42cdf0189fdc41a8f82 (diff) | |
download | haskell-f3f624aeb1360c1f902930b3cc62346d2e5201c0.tar.gz |
Include libraries which fill holes as deps when linking.
Fixes the issue reported at https://github.com/haskell/cabal/issues/4755
and fixes #14304 in the GHC tracker.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: bgamari, austin, goldfire
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14304
Differential Revision: https://phabricator.haskell.org/D4057
Diffstat (limited to 'compiler/main/Packages.hs')
-rw-r--r-- | compiler/main/Packages.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs index 172e1818fc..949cc0f231 100644 --- a/compiler/main/Packages.hs +++ b/compiler/main/Packages.hs @@ -1878,8 +1878,10 @@ listVisibleModuleNames dflags = -- | Find all the 'PackageConfig' in both the preload packages from 'DynFlags' and corresponding to the list of -- 'PackageConfig's getPreloadPackagesAnd :: DynFlags -> [PreloadUnitId] -> IO [PackageConfig] -getPreloadPackagesAnd dflags pkgids = +getPreloadPackagesAnd dflags pkgids0 = let + pkgids = pkgids0 ++ map (toInstalledUnitId . moduleUnitId . snd) + (thisUnitIdInsts dflags) state = pkgState dflags pkg_map = pkgIdMap state preload = preloadPackages state |