Hi Simon,

Note that this is occurring while compiling `ghc-boot-th-next`. This package vendors the TemplateHaskell interfaces from ghc-internal and is built by the boot compiler. You will find a bunch of CPP in the TemplateHaskell modules like `GHC.Internal.TH.Syntax` that switches out `ghc-internal` imports for `base` imports when bootstrapping so we can compile with the boot compiler. For more context see `Note [Bootstrapping Template Haskell]`.

When building `ghc-boot-th-next` none of the non-TemplateHaskell modules from `ghc-internal` should be built so something is going wrong here. Perhaps somehow have newly added a dependency here, which we should hide behind the BOOTSTRAP_TH CPP flag.

Cheers,
Teo

On Wed, 25 Mar 2026, at 12:56 PM, Brandon Allbery via ghc-devs wrote:
I'd suspect it's your boot compiler producing that error, and that what changed might have been the file being compiled, causing a recompile with the wrong compiler?

On Wed, Mar 25, 2026 at 8:53 AM Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org> wrote:
Friends

After 10 days of working on !15719 I have suddenly started getting

/home/simonpj/code/HEAD-19/libraries/ghc-boot-th-next/../ghc-internal/src/GHC/Internal/Classes.hs:10:17: error: [GHC-04924]
    Unknown flag in  {-# OPTIONS_GHC #-} pragma: -fdefines-known-key-names
   |
10 | {-# OPTIONS_GHC -fdefines-known-key-names #-}
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^

I have no idea why this was fine until 10am this morning, and has suddenly started happening now.  

How does GHC decide what runtime flags it allows?  `-fdefines-known-key-names` is in GHC.Driver.Session.fFlagsDeps.


I'm boggled that it worked until 10am and then abruptly stopped.

Any advice?

Simon

_______________________________________________
ghc-devs mailing list -- ghc-devs@haskell.org
To unsubscribe send an email to ghc-devs-leave@haskell.org


--
brandon s allbery kf8nh
_______________________________________________
ghc-devs mailing list -- ghc-devs@haskell.org
To unsubscribe send an email to ghc-devs-leave@haskell.org