diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-05-13 11:32:41 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-06-13 02:13:03 -0400 |
commit | ed533ec217667423e4fce30040f24053dbcc7de4 (patch) | |
tree | a810bd338fb4044538fba0c78df041a3e2c225e1 /compiler/GHC/Driver/CodeOutput.hs | |
parent | f50c19b8a78da9252cb39f49c1c66db4a684cc3b (diff) | |
download | haskell-ed533ec217667423e4fce30040f24053dbcc7de4.tar.gz |
Rename Package into Unit
The terminology changed over time and now package databases contain
"units" (there can be several units compiled from a single Cabal
package: one per-component, one for each option set, one per
instantiation, etc.). We should try to be consistent internally and use
"units": that's what this renaming does. Maybe one day we'll fix the UI
too (e.g. replace -package-id with -unit-id, we already have
-this-unit-id and ghc-pkg has -unit-id...) but it's not done in this
patch.
* rename getPkgFrameworkOpts into getUnitFrameworkOpts
* rename UnitInfoMap into ClosureUnitInfoMap
* rename InstalledPackageIndex into UnitInfoMap
* rename UnusablePackages into UnusableUnits
* rename PackagePrecedenceIndex into UnitPrecedenceMap
* rename PackageDatabase into UnitDatabase
* rename pkgDatabase into unitDatabases
* rename pkgState into unitState
* rename initPackages into initUnits
* rename renamePackage into renameUnitInfo
* rename UnusablePackageReason into UnusableUnitReason
* rename getPackage* into getUnit*
* etc.
Diffstat (limited to 'compiler/GHC/Driver/CodeOutput.hs')
-rw-r--r-- | compiler/GHC/Driver/CodeOutput.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs index e9ac354090..01de8cf982 100644 --- a/compiler/GHC/Driver/CodeOutput.hs +++ b/compiler/GHC/Driver/CodeOutput.hs @@ -131,7 +131,7 @@ outputC dflags filenm cmm_stream packages -- * -#include options from the cmdline and OPTIONS pragmas -- * the _stub.h file, if there is one. -- - let rts = unsafeLookupUnitId (pkgState dflags) rtsUnitId + let rts = unsafeLookupUnitId (unitState dflags) rtsUnitId let cc_injects = unlines (map mk_include (unitIncludes rts)) mk_include h_file = @@ -223,7 +223,7 @@ outputForeignStubs dflags mod location stubs -- we need the #includes from the rts package for the stub files let rts_includes = - let rts_pkg = unsafeLookupUnitId (pkgState dflags) rtsUnitId in + let rts_pkg = unsafeLookupUnitId (unitState dflags) rtsUnitId in concatMap mk_include (unitIncludes rts_pkg) mk_include i = "#include \"" ++ i ++ "\"\n" |