[Git][ghc/ghc][wip/T23536-teo] Apply 5 suggestion(s) to 1 file(s)
Teo Camarasu (@teo)
gitlab at gitlab.haskell.org
Fri Apr 5 10:51:54 UTC 2024
Teo Camarasu pushed to branch wip/T23536-teo at Glasgow Haskell Compiler / GHC
Commits:
6fb08605 by Sebastian Graf at 2024-04-05T10:51:50+00:00
Apply 5 suggestion(s) to 1 file(s)
- - - - -
1 changed file:
- compiler/GHC/Tc/Gen/Splice.hs
Changes:
=====================================
compiler/GHC/Tc/Gen/Splice.hs
=====================================
@@ -2919,17 +2919,20 @@ tcGetInterp = do
-- Note [Bootstrapping Template Haskell]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
-- Template Haskell requires special attention when compiling GHC.
-- The implementation of the Template Haskell set of features requires tight
--- coupling between the compiler and the `template-haskell` library.
+-- coupling between the compiler and the `template-haskell` library:
+-- on one hand, there are many known-key definitions in GHC.Builtin.Names.TH
+-- pointing to the in-tree library;
+-- on the other hand, the compiler needs to be compiled against parts of the in-tree TH AST
+-- to enable serialisation.
-- This complicates the bootstrapping story as compatibility constraints are
-- placed on the version of `template-haskell` used to compile GHC during a
-- particular stage and the version bundled with it.
--
-- These constraints can be divided by the features they are used to implement,
-- namely running splices either directly or via the external interpreter, and
--- desugaring bracket syntax.
+-- desugaring quotes.
--
-- (C1) Executing splices within the compiler: In order to execute a splice
-- within the compiler, we must be able to compile and load code built against
@@ -2981,8 +2984,8 @@ tcGetInterp = do
-- referenced the in-tree version of `template-haskell` not the one the boot
-- compiler required. So they could never be run.
--
--- Our current strategy is to not build `template-haskell` as a stage0 package.
--- All of GHCs dependencies depend on the boot compilers version, and produce
+-- Our current strategy is to avoid building the in-tree `template-haskell` as a stage0 package entirely.
+-- All of stage1 GHCs source dependencies depend on the boot compilers version, and produce
-- runnable splices. How do we deal with the stage1 compiler's dependency on
-- `template-haskell`? There are two options. (D1) depend on the boot
-- compiler's version for stage1 and then depend on the in-tree one in stage2.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fb086057e726b389864a1516bf5e2e1176d47b5
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fb086057e726b389864a1516bf5e2e1176d47b5
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/20240405/04597b8f/attachment-0001.html>
More information about the ghc-commits
mailing list