summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2023-02-02 18:35:54 -0500
committerBen Gamari <ben@smart-cactus.org>2023-02-02 18:36:13 -0500
commite1eb940ce543db47292f5191bce6168569f070a5 (patch)
tree452d321d5b52272265f9ec3521d0d2646b8a3f8c
parent84cd7d832e33a2db2423590b1291cb9533c50265 (diff)
downloadhaskell-e1eb940ce543db47292f5191bce6168569f070a5.tar.gz
Rename
-rw-r--r--compiler/GHC/Builtin/Names.hs2
-rw-r--r--compiler/GHC/Driver/Pipeline/Execute.hs2
-rw-r--r--compiler/GHC/Parser/Header.hs2
-rw-r--r--compiler/GHC/StgToJS/Linker/Linker.hs4
-rw-r--r--compiler/GHC/Unit/State.hs2
-rw-r--r--compiler/GHC/Unit/Types.hs14
6 files changed, 13 insertions, 13 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs
index 1c26e1aaa9..cdbdbca59a 100644
--- a/compiler/GHC/Builtin/Names.hs
+++ b/compiler/GHC/Builtin/Names.hs
@@ -673,7 +673,7 @@ mkBaseModule :: FastString -> Module
mkBaseModule m = mkBaseModule_ (mkModuleNameFS m)
mkBaseModule_ :: ModuleName -> Module
-mkBaseModule_ m = mkModule baseUnit m
+mkBaseModule_ m = mkModule ghcBaseUnit m
mkThisGhcModule :: FastString -> Module
mkThisGhcModule m = mkThisGhcModule_ (mkModuleNameFS m)
diff --git a/compiler/GHC/Driver/Pipeline/Execute.hs b/compiler/GHC/Driver/Pipeline/Execute.hs
index 75f33834e2..bd00dee596 100644
--- a/compiler/GHC/Driver/Pipeline/Execute.hs
+++ b/compiler/GHC/Driver/Pipeline/Execute.hs
@@ -540,7 +540,7 @@ runCcPhase cc_phase pipe_env hsc_env location input_fn = do
-- way we do the import depends on whether we're currently compiling
-- the base package or not.
++ (if platformOS platform == OSMinGW32 &&
- isHomeUnitId home_unit baseUnitId
+ isHomeUnitId home_unit ghcBaseUnitId
then [ "-DCOMPILING_BASE_PACKAGE" ]
else [])
diff --git a/compiler/GHC/Parser/Header.hs b/compiler/GHC/Parser/Header.hs
index 9daf8e5d71..a435c964c3 100644
--- a/compiler/GHC/Parser/Header.hs
+++ b/compiler/GHC/Parser/Header.hs
@@ -139,7 +139,7 @@ mkPrelImports this_mod loc implicit_prelude import_decls
-- allow explicit "base" package qualifier (#19082, #17045)
&& case ideclPkgQual decl of
NoRawPkgQual -> True
- RawPkgQual b -> sl_fs b == unitIdFS baseUnitId
+ RawPkgQual b -> sl_fs b == unitIdFS ghcBaseUnitId
loc' = noAnnSrcSpan loc
diff --git a/compiler/GHC/StgToJS/Linker/Linker.hs b/compiler/GHC/StgToJS/Linker/Linker.hs
index 9c4a077c0b..6a7b1be124 100644
--- a/compiler/GHC/StgToJS/Linker/Linker.hs
+++ b/compiler/GHC/StgToJS/Linker/Linker.hs
@@ -623,7 +623,7 @@ diffDeps pkgs (deps_pkgs,deps_funs) =
-- | dependencies for the RTS, these need to be always linked
rtsDeps :: [UnitId] -> ([UnitId], Set ExportedFun)
rtsDeps pkgs = diffDeps pkgs $
- ( [baseUnitId, primUnitId]
+ ( [ghcBaseUnitId, primUnitId]
, S.fromList $ concat
[ mkBaseFuns "GHC.Conc.Sync"
["reportError"]
@@ -684,7 +684,7 @@ rtsDeps pkgs = diffDeps pkgs $
-- | Export the functions in base
mkBaseFuns :: FastString -> [FastString] -> [ExportedFun]
-mkBaseFuns = mkExportedFuns baseUnitId
+mkBaseFuns = mkExportedFuns ghcBaseUnitId
-- | Export the Prim functions
mkPrimFuns :: FastString -> [FastString] -> [ExportedFun]
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs
index 8123bbaab6..c4637021a2 100644
--- a/compiler/GHC/Unit/State.hs
+++ b/compiler/GHC/Unit/State.hs
@@ -360,7 +360,7 @@ initUnitConfig dflags cached_dbs home_units =
| not (gopt Opt_AutoLinkPackages dflags) = []
-- By default we add base & rts to the preload units (when they are
-- found in the unit database) except when we are building them
- | otherwise = filter (hu_id /=) [baseUnitId, rtsUnitId]
+ | otherwise = filter (hu_id /=) [ghcBaseUnitId, rtsUnitId]
-- if the home unit is indefinite, it means we are type-checking it only
-- (not producing any code). Hence we can use virtual units instantiated
diff --git a/compiler/GHC/Unit/Types.hs b/compiler/GHC/Unit/Types.hs
index 7439ab7dde..7e02133ae4 100644
--- a/compiler/GHC/Unit/Types.hs
+++ b/compiler/GHC/Unit/Types.hs
@@ -62,7 +62,7 @@ module GHC.Unit.Types
-- * Wired-in units
, primUnitId
, bignumUnitId
- , baseUnitId
+ , ghcBaseUnitId
, rtsUnitId
, thUnitId
, mainUnitId
@@ -71,7 +71,7 @@ module GHC.Unit.Types
, primUnit
, bignumUnit
- , baseUnit
+ , ghcBaseUnit
, rtsUnit
, thUnit
, mainUnit
@@ -587,15 +587,15 @@ Make sure you change 'GHC.Unit.State.findWiredInUnits' if you add an entry here.
-}
-bignumUnitId, primUnitId, baseUnitId, rtsUnitId,
+bignumUnitId, primUnitId, ghcBaseUnitId, rtsUnitId,
thUnitId, mainUnitId, thisGhcUnitId, interactiveUnitId :: UnitId
-bignumUnit, primUnit, baseUnit, rtsUnit,
+bignumUnit, primUnit, ghcBaseUnit, rtsUnit,
thUnit, mainUnit, thisGhcUnit, interactiveUnit :: Unit
primUnitId = UnitId (fsLit "ghc-prim")
bignumUnitId = UnitId (fsLit "ghc-bignum")
-baseUnitId = UnitId (fsLit "base")
+ghcBaseUnitId = UnitId (fsLit "base")
rtsUnitId = UnitId (fsLit "rts")
thisGhcUnitId = UnitId (fsLit "ghc")
interactiveUnitId = UnitId (fsLit "interactive")
@@ -604,7 +604,7 @@ thUnitId = UnitId (fsLit "template-haskell")
thUnit = RealUnit (Definite thUnitId)
primUnit = RealUnit (Definite primUnitId)
bignumUnit = RealUnit (Definite bignumUnitId)
-baseUnit = RealUnit (Definite baseUnitId)
+ghcBaseUnit = RealUnit (Definite ghcBaseUnitId)
rtsUnit = RealUnit (Definite rtsUnitId)
thisGhcUnit = RealUnit (Definite thisGhcUnitId)
interactiveUnit = RealUnit (Definite interactiveUnitId)
@@ -622,7 +622,7 @@ wiredInUnitIds :: [UnitId]
wiredInUnitIds =
[ primUnitId
, bignumUnitId
- , baseUnitId
+ , ghcBaseUnitId
, rtsUnitId
, thUnitId
, thisGhcUnitId