Skip to content

WIP: support for GHC 9.14.2 (rc) - #5045

Open
guibou wants to merge 2 commits into
masterfrom
ghc_9142rc1
Open

guibou wants to merge 2 commits into
masterfrom
ghc_9142rc1

Conversation

@guibou

@guibou guibou commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

This is a work in progress in order to get something which runs with 9.14.2. For now, the correct CPP guard are not implemented (because I don't know how to be robust here) and also because the API can still change.

@Bodigrim

Copy link
Copy Markdown
Contributor

because I don't know how to be robust here

Could you use __GLASGOW_HASKELL_PATCHLEVEL{1,2}__?


-- TODO: here we convert a set into a list and then do n lookup (in
-- log(k), hence nlog(k).). However we may be able to do something smarter with
-- "restrictKeys" which runs in nlog(n/k + 1).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welp, this nerd sniped me big time.
I thought "why not simply convert both the map and set to lists and then work through the heads of both lists similarly to the merge part of mergesort" and fell down quite a rabbit hole: haskell/containers#1256

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, sorry ;) Super interesting discussion and research ! Thank you.

guibou and others added 2 commits December 1, 2026 14:35
This is a work in progress in order to get something which runs with
9.14.2 (rc2). For now, the correct CPP guard are not implemented (because I
don't know how to be robust here) and also because the API can still change.

See ghc commit 9105d7a3
Allows us to share the loaded UnitDatabases across home units.
hamishmack pushed a commit to ican-group/haskell.nix that referenced this pull request Dec 3, 2026
Adds GHC 9.14.2 (`ghc9142`) from the release (stable-haskell/ghc `ghc-9.14.2-iog`, the `ghc-9.14.2-release` commit 4639fd43), and makes it the latest 9.14: `ghc914`/`ghc914llvm` and CI now use it.

- 9.14.2 changed how haddock is generated for the GHC.Prim module, so it needs an updated Cabal-3.14 patch (`ghc-9.14.2-Cabal-3.14.patch`, keeping only the `--wrappers-module` part).
- 9.14.2 has the 16-bit ELF section header fix, so `ghc-16bit-elf-section-header-overflow.patch` now stops at 9.14.2.
- 9.14.2 added `rts_EINTR` to the Windows RTS symbol list, so the windows rts symbols patch has a 9.14.2 variant (the ghc915 pin keeps the original).
- 9.14.2's `ghc --info` reports `Semaphore version`, so dummy-ghc now does too for 9.14.2.
- 9.14.2 added `template-haskell-lift` and `template-haskell-quasiquoter` to the closure of `ghci`; they are added to the v1 ghcjs/wasm list, or TH there fails to find `ghci`.
- HLS is skipped for 9.14.2 for now: 9.14.2 changed the `ActivationAnn` API and ghc-exactprint 1.14.3.0 does not build against it (see alanz/ghc-exactprint#146 and haskell/haskell-language-server#5045).
- The ghc9141-specific CI, test gate, Makefile, ci-status script and docs references move to ghc9142.
peti added a commit to peti/nixpkgs that referenced this pull request Dec 3, 2026
….14.2

- ghcide: apply haskell/haskell-language-server#5045
  to adapt to the GHC 9.14.2 API (e.g. the new mkIfaceTc argument).
- haskell-language-server: apply the upstream fourmolu 0.21 bound bump
  from haskell/haskell-language-server#5103.
- Use the Cabal 3.16.1.0 bundled with GHC 9.14.2 for HLS instead of the
  Cabal 3.16 from Hackage. ormolu and fourmolu require Cabal-syntax 3.16
  and use the bundled one, so the HLS closure must use it as well.
- cabal-install 3.16 rejects the semaphore-compat 2.0.1 bundled with
  GHC 9.14.2, and cabal-install 3.18 needs Cabal 3.18. HLS only needs the
  cabal-add library, so build cabal-add without its executable and test
  suites, the only parts that depend on cabal-install.
@georgefst

georgefst commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

GHC 9.14.2 has been released. What is necessary to get this merged and released on Hackage?

hie-bios got a release with 9.14.2 support yesterday: haskell/hie-bios#537. So it looks like alanz/ghc-exactprint#146 is the sole blocker.

EDIT: see next comment

@georgefst

georgefst commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Okay, I was clearly juggling too many tabs earlier and got confused with my previous comment, quoting a message that wasn't even from this thread...

Anyway, both libraries used via source-repository-package here now have new releases with GHC 9.14.2 support, which makes things a bit simpler. See haskell/hie-bios#537 and alanz/ghc-exactprint#160.

@georgefst

Copy link
Copy Markdown
Collaborator

Another complicating factor is that GHC 9.14.2 contains a major bump to semaphore-compat, which is supported only by Cabal 3.18 (it really would have been nice if a new minor version of Cabal 3.16 had been released with support). So any library which depends on Cabal is likely to need patching for compatibility. We already have a fix for Ormolu in tweag/ormolu#1230 (which will be merged in to Fourmolu once released). I think the only remaining thing that needs fixing after that is hls-cabal-plugin (ping @VeryMilkyJoe?). Then we can build an HLS for GHC 9.14.2 that supports all the same plugins as on 9.14.1.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants