[Git][ghc/ghc][wip/reinstallable-th] JS needs ghcBootTh not ghcInternal

Teo Camarasu (@teo) gitlab at gitlab.haskell.org
Fri May 24 21:45:13 UTC 2024



Teo Camarasu pushed to branch wip/reinstallable-th at Glasgow Haskell Compiler / GHC


Commits:
d70cb9f9 by Teo Camarasu at 2024-05-24T22:44:57+01:00
JS needs ghcBootTh not ghcInternal

- - - - -


3 changed files:

- compiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs


Changes:

=====================================
compiler/GHC/Runtime/Interpreter/JS.hs
=====================================
@@ -303,8 +303,8 @@ jsLinkObjects logger tmpfs tmp_dir cfg unit_env inst objs is_root = do
         }
 
   let units = preloadUnits (ue_units unit_env)
-              ++ [ghcInternalUnitId] -- don't forget ghc-internal which is an implicit dep
-                                     -- eg, for desugaring TH quotes
+              ++ [ghcBootThUnitId ] -- don't forget ghc-boot-th which is an implicit dep
+                                    -- eg, for desugaring TH quotes
 
   -- compute dependencies
   let link_spec = LinkSpec


=====================================
compiler/GHC/Unit/State.hs
=====================================
@@ -2272,7 +2272,7 @@ pprWithUnitState state = updSDocContext (\ctx -> ctx
 -- | Add package dependencies on the wired-in packages we use
 implicitPackageDeps :: DynFlags -> [UnitId]
 implicitPackageDeps dflags
-   = [ghcInternalUnitId | xopt TemplateHaskellQuotes dflags]
+   = [ghcBootThUnitId | xopt TemplateHaskellQuotes dflags]
    -- TODO: Should also include `base` and `ghc-prim` if we use those implicitly, but
    -- it is possible to not depend on base (for example, see `ghc-prim`)
 


=====================================
compiler/GHC/Unit/Types.hs
=====================================
@@ -68,6 +68,7 @@ module GHC.Unit.Types
    , mainUnitId
    , thisGhcUnitId
    , interactiveUnitId
+   , ghcBootThUnitId
 
    , primUnit
    , bignumUnit
@@ -595,10 +596,10 @@ Make sure you change 'GHC.Unit.State.findWiredInUnits' if you add an entry here.
 
 bignumUnitId, primUnitId, ghcInternalUnitId, baseUnitId, rtsUnitId,
   mainUnitId, thisGhcUnitId, interactiveUnitId,
-  experimentalUnitId :: UnitId
+  experimentalUnitId, ghcBootThUnitId  :: UnitId
 
 bignumUnit, primUnit, ghcInternalUnit, baseUnit, rtsUnit,
-  mainUnit, thisGhcUnit, interactiveUnit, experimentalUnit  :: Unit
+  mainUnit, thisGhcUnit, interactiveUnit, experimentalUnit :: Unit
 
 primUnitId        = UnitId (fsLit "ghc-prim")
 bignumUnitId      = UnitId (fsLit "ghc-bignum")
@@ -608,6 +609,7 @@ rtsUnitId         = UnitId (fsLit "rts")
 thisGhcUnitId     = UnitId (fsLit cProjectUnitId) -- See Note [GHC's Unit Id]
 interactiveUnitId = UnitId (fsLit "interactive")
 experimentalUnitId = UnitId (fsLit "ghc-experimental")
+ghcBootThUnitId = UnitId (fsLit "ghc-boot-th")
 
 primUnit          = RealUnit (Definite primUnitId)
 bignumUnit        = RealUnit (Definite bignumUnitId)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d70cb9f91cba6ef681527fd0bf5317d40a5ee497

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d70cb9f91cba6ef681527fd0bf5317d40a5ee497
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240524/687e6055/attachment-0001.html>


More information about the ghc-commits mailing list