Skip to content

Support ghc-9.14#827

Draft
erikd wants to merge 5 commits intomainfrom
erikd/ghc-9.14
Draft

Support ghc-9.14#827
erikd wants to merge 5 commits intomainfrom
erikd/ghc-9.14

Conversation

@erikd
Copy link
Collaborator

@erikd erikd commented Mar 5, 2026

Description

Support ghc-9.14 exncluding adding it to CI.

The tests found a bug in the code which is only triggered when compiling with ghc-9.14 due to changes in strictness analysis and optimisation behavior. Using Claude I have come up with a fix for that, but I am still validating that fix which will be in a later PR and I will then include ghc-9.14 to CI.

Checklist

  • Read our contribution guidelines at CONTRIBUTING.md, and make sure that this PR complies with the guidelines.

@erikd erikd force-pushed the erikd/ghc-9.14 branch 2 times, most recently from 0fe8598 to acac990 Compare March 6, 2026 05:49
@erikd erikd force-pushed the erikd/ghc-9.14 branch 3 times, most recently from 4b16e72 to efdb4e4 Compare March 6, 2026 08:58
* Remove usage of -Wno-x-partial from cabal file where it
  is not needed.
* Disable -Wredundant-constraint warning for ghc >= 9.14.
* Disable -Wpattern-namespace-specifier for ghc >= 9.14.
@erikd
Copy link
Collaborator Author

erikd commented Mar 9, 2026

I have logged a GHC ticket https://gitlab.haskell.org/ghc/ghc/-/issues/27005 asking if this is a ghc-9.14 optimization bug.

If it is a bug this PR still makes sense, but we might want to wait for a fix before adding ghc-9.14 to CI.

Copy link
Collaborator

@jorisdral jorisdral left a comment

Choose a reason for hiding this comment

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

Thank you!

Could you also add changelog entries for blockio and lsm-tree? Something along the lines of:

* Support `ghc-9.14`. See [PR #827](https://github.com/IntersectMBO/lsm-tree/pull/827)

Comment on lines +698 to +701
-- ghc-9.14 gives redundant constraint warnings on some constraints
-- that are needed for earlier compilers.
if impl(ghc >=9.14)
ghc-options: -Wno-redundant-constraints
Copy link
Collaborator

@jorisdral jorisdral Mar 9, 2026

Choose a reason for hiding this comment

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

It might be better to only selectively disable this warning per module, so that we still get some warnings in modules where they do matter

, fs-sim
, io-classes
, io-sim
, io-sim <1.10
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this upper bound for? Is there something incompatible in io-sim-1.10?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the issue? input-output-hk/io-sim#247

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, there is. I had a comment in the file but the auto format did not like the comment.

io-sim-1.10 drops a method from a typeclass.

, deepseq ^>=1.4 || ^>=1.5
, fs-api ^>=0.4
, io-classes ^>=1.6 || ^>=1.7 || ^>=1.8.0.1
, io-classes ^>=1.6 || ^>=1.7 || ^>=1.8.0.1 || ^>=1.9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that #819 also adds support for io-classes-1.9 and io-classes-1.10, so there might be some conflicts

@jorisdral
Copy link
Collaborator

BTW, I might hold off on merging this PR just until we know the fix for ghc-9.14 works

@jorisdral jorisdral linked an issue Mar 10, 2026 that may be closed by this pull request
@erikd
Copy link
Collaborator Author

erikd commented Mar 12, 2026

Turns out that the tests in this repo uncovered a bug in GHC.
See: https://gitlab.haskell.org/ghc/ghc/-/issues/27005 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15688

@erikd
Copy link
Collaborator Author

erikd commented Mar 13, 2026

This PR is on hold until ghc-9.14.2 (which should contain a bug fix for the issue discovered).

I will switch it to "draft" mode.

@erikd erikd marked this pull request as draft March 13, 2026 04:56
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.

Support ghc-9.14

2 participants