If you're adding it to a cabal file then you need to modify Cabal, because it wants to mark packages as unbuildable on ghcs that don't support declared extensions. Placing it in source files avoids this, but you would have to modify all files that need to know about it (hopefully that doesn't mean all of `base`).

On Sun, Mar 15, 2026 at 4:08 PM Simon Peyton Jones <simon.peytonjones@gmail.com> wrote:
Thanks.   But where is this Cabal-syntax directory?   How do I "bump the cabal version"?   

I'm only trying to build GHC!  I wasn't intending to modify cabal.

Simon

On Sun, 15 Mar 2026 at 17:26, Brandon Allbery <allbery.b@gmail.com> wrote:
It goes in `Cabal-syntax/src/Language/Haskell/Extensions.hs`, in `data KnownExtension`. The parse table is built from the constructor names, and `No` prefixes are handled automatically. Note that you'll need to also bump the `cabal-version` (file format version) and add an entry to the file format documentation (`doc/file-format-changelog.rst`).

On Sun, Mar 15, 2026 at 1:18 PM Simon Peyton Jones via ghc-devs <ghc-devs@haskell.org> wrote:
Friends

As part of the reinstallable base project I'm adding an extension "ImplicitKnownKeyNames" to GHC.  But if I put "NoImplicitKnownKeyNames" in base.cabal.in I get the error

Warning: [unknown-extension] Unknown extensions: NoImplicitKnownKeyNames

when building the base library.  I think this comes from cabal.

How can I tell cabal about the new extension?

Thanks

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


--
brandon s allbery kf8nh


--
brandon s allbery kf8nh
allbery.b@gmail.com