Make template-haskell a stage1 package
Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By:Sebastian Graf <sgraf1337@gmail.com>
parent
da2a10ce
Pipeline #92934 canceled
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Showing
- .gitignore 2 additions, 0 deletions.gitignore
- compiler/GHC/Tc/Gen/Splice.hs 96 additions, 0 deletionscompiler/GHC/Tc/Gen/Splice.hs
- compiler/ghc.cabal.in 16 additions, 1 deletioncompiler/ghc.cabal.in
- hadrian/src/Packages.hs 7 additions, 5 deletionshadrian/src/Packages.hs
- hadrian/src/Rules/Dependencies.hs 4 additions, 1 deletionhadrian/src/Rules/Dependencies.hs
- hadrian/src/Rules/Generate.hs 29 additions, 5 deletionshadrian/src/Rules/Generate.hs
- hadrian/src/Rules/ToolArgs.hs 1 addition, 15 deletionshadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings/Default.hs 4 additions, 2 deletionshadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs 15 additions, 3 deletionshadrian/src/Settings/Packages.hs
- libraries/ghc-boot-th/ghc-boot-th.cabal.in 5 additions, 4 deletionslibraries/ghc-boot-th/ghc-boot-th.cabal.in
- libraries/ghc-boot/ghc-boot.cabal.in 25 additions, 8 deletionslibraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghci/ghci.cabal.in 16 additions, 1 deletionlibraries/ghci/ghci.cabal.in
- libraries/template-haskell/Language/Haskell/TH/Syntax.hs 19 additions, 13 deletionslibraries/template-haskell/Language/Haskell/TH/Syntax.hs
- libraries/template-haskell/template-haskell.cabal.in 21 additions, 9 deletionslibraries/template-haskell/template-haskell.cabal.in
Loading
Please register or sign in to comment