> *But what business does the bootstrap compiler have with compiling > GHC.Internal.Classes? *
Aha! I see the issue. If you look here: https://gitlab.haskell.org/ghc/ghc/-/blob/master/libraries/ghc-boot-th/ghc-boot-th.cabal.in#L55 if flag(bootstrap) cpp-options: -DBOOTSTRAP_TH build-depends: ghc-prim hs-source-dirs: @SourceRoot@ ../ghc-internal/src exposed-modules: GHC.Boot.TH.Lib GHC.Boot.TH.Syntax GHC.Boot.TH.Monad other-modules: GHC.Internal.TH.Lib GHC.Internal.TH.Syntax GHC.Internal.TH.Monad GHC.Internal.ForeignSrcLang GHC.Internal.LanguageExtensions GHC.Internal.Lexeme You can see the modules that we vendor from `ghc-internal` under `other-modules. One of those is `GHC.Internal.ForeignSrcLang` and in your PR you add: ``` import GHC.Internal.Classes( (==) ) -- For known-key names ``` This needs to go inside the `else` branch of the `ifdef BOOTSTRAP_TH` pragma. I think if you do the same thing for any `ghc-internal` imports in the other modules mentioned above then you should be fine. I really should add a note explaining this BOOTSTRAP_TH business, especially because it is quite hacky(!). Note [Bootstrapping Template Haskell] does a good job of explaining the design decisions we made to get here, but we need another note to explain this CPP soup. Cheers, Teo
_______________________________________________ ghc-devs mailing list -- [email protected] To unsubscribe send an email to [email protected]
