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/Driver/Pipeline.hs | |
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/Driver/Pipeline.hs')
-rw-r--r-- | compiler/GHC/Driver/Pipeline.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs index bbc44a4653..5465ebefd9 100644 --- a/compiler/GHC/Driver/Pipeline.hs +++ b/compiler/GHC/Driver/Pipeline.hs @@ -515,7 +515,7 @@ linkingNeeded dflags staticLink linkables pkg_deps = do -- not extra_libraries or -l things from the command line. let pkgstate = pkgState dflags let pkg_hslibs = [ (collectLibraryPaths dflags [c], lib) - | Just c <- map (lookupInstalledPackage pkgstate) pkg_deps, + | Just c <- map (lookupUnitId pkgstate) pkg_deps, lib <- packageHsLibs dflags c ] pkg_libfiles <- mapM (uncurry (findHSLib dflags)) pkg_hslibs @@ -1312,7 +1312,7 @@ runPhase (RealPhase cc_phase) input_fn dflags -- way we do the import depends on whether we're currently compiling -- the base package or not. ++ (if platformOS platform == OSMinGW32 && - homeUnit dflags == baseUnitId + homeUnitId dflags == baseUnitId then [ "-DCOMPILING_BASE_PACKAGE" ] else []) @@ -2223,7 +2223,7 @@ getGhcVersionPathName dflags = do candidates <- case ghcVersionFile dflags of Just path -> return [path] Nothing -> (map (</> "ghcversion.h")) <$> - (getPackageIncludePath dflags [toUnitId rtsUnitId]) + (getPackageIncludePath dflags [rtsUnitId]) found <- filterM doesFileExist candidates case found of |