template-haskell: Move wired-ins to ghc-internal
Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so -------------------------
Showing
- .gitignore 0 additions, 1 deletion.gitignore
- compiler/GHC/Builtin/Names/TH.hs 12 additions, 10 deletionscompiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Hs/Expr.hs 1 addition, 1 deletioncompiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Quote.hs 5 additions, 6 deletionscompiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Recomp.hs 1 addition, 3 deletionscompiler/GHC/Iface/Recomp.hs
- compiler/GHC/Plugins.hs 1 addition, 1 deletioncompiler/GHC/Plugins.hs
- compiler/GHC/Rename/Names.hs 1 addition, 5 deletionscompiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Splice.hs 1 addition, 1 deletioncompiler/GHC/Rename/Splice.hs
- compiler/GHC/Runtime/Interpreter/JS.hs 0 additions, 1 deletioncompiler/GHC/Runtime/Interpreter/JS.hs
- compiler/GHC/Tc/Errors/Ppr.hs 6 additions, 1 deletioncompiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs 1 addition, 1 deletioncompiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Splice.hs 28 additions, 24 deletionscompiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Gen/Splice.hs-boot 1 addition, 1 deletioncompiler/GHC/Tc/Gen/Splice.hs-boot
- compiler/GHC/Tc/Types/TH.hs 1 addition, 1 deletioncompiler/GHC/Tc/Types/TH.hs
- compiler/GHC/ThToHs.hs 2 additions, 3 deletionscompiler/GHC/ThToHs.hs
- compiler/GHC/Unit/State.hs 1 addition, 11 deletionscompiler/GHC/Unit/State.hs
- compiler/GHC/Unit/Types.hs 2 additions, 7 deletionscompiler/GHC/Unit/Types.hs
- compiler/ghc.cabal.in 4 additions, 4 deletionscompiler/ghc.cabal.in
- hadrian/src/Packages.hs 2 additions, 3 deletionshadrian/src/Packages.hs
- hadrian/src/Rules/Generate.hs 0 additions, 8 deletionshadrian/src/Rules/Generate.hs
Loading
Please register or sign in to comment