Skip to content

Support GHC version 9.14.1.#58

Merged
blamario merged 6 commits into
blamario:masterfrom
jonathanknowles:jonathanknowles/ghc-9.14
Apr 22, 2026
Merged

Support GHC version 9.14.1.#58
blamario merged 6 commits into
blamario:masterfrom
jonathanknowles:jonathanknowles/ghc-9.14

Conversation

@jonathanknowles
Copy link
Copy Markdown
Contributor

@jonathanknowles jonathanknowles commented Apr 18, 2026

Fixes #57.

This change adds support for GHC 9.14.1 by:

  • adding a declaration to the tested-with section of the .cabal file; and
  • upgrading the haskell-ci configuration.

The newer version of haskell-ci promotes several warnings to errors in CI, including unused-packages and incomplete-uni-patterns.

In light of this, this change also:

  1. Removes unused dependencies on packages primes and QuickCheck.
  2. In selected modules, demotes incomplete-uni-patterns to a warning via {-# OPTIONS_GHC -Wwarn=incomplete-uni-patterns #-}
  3. Adds a cabal.project to make it easy to reproduce CI build failures locally.

The new version promotes several warnings to errors in CI:

- `missing-fields`
- `unused-packages`
- `incomplete-patterns`
- `incomplete-uni-patterns`

Subsequent commits address the resulting build failures.
@jonathanknowles jonathanknowles mentioned this pull request Apr 18, 2026
4 tasks
@blamario
Copy link
Copy Markdown
Owner

I'm not convinced the pattern-matching changes don't impact performance, but I don't have time to test it right now.

@jonathanknowles
Copy link
Copy Markdown
Contributor Author

jonathanknowles commented Apr 21, 2026

I'm not convinced the pattern-matching changes don't impact performance, but I don't have time to test it right now.

Understood.

Instead of changing the pattern matches, perhaps we could simply demote the errors back to warnings by adding one of the following pragmas to each affected module (there are only four such modules):

  • {-# OPTIONS_GHC -Wwarn=incomplete-patterns #-}
  • {-# OPTIONS_GHC -Wwarn=incomplete-uni-patterns #-}

Alternatively, we could either:

  1. Add ghc-options: -Wwarn=incomplete-patterns -Wwarn=incomplete-uni-patterns to the cabal file;
    or
  2. Manually adjust the generated haskell-ci.yml so that these warnings are no longer promoted to errors by CI. However, this would be overwritten again on the next haskell-ci regenerate...

@blamario
Copy link
Copy Markdown
Owner

Option 0 seems best, with the OPTIONS_GHC pragmas

This makes it possible to reproduce CI build failures locally without
having to run the full CI pipeline.
Packages `primes` and `QuickCheck` were actually unused in the test suite.

(Unused packages are now flagged as errors by the upgraded CI configuration.)
This change adds the following pragma to a small selection of modules
that use irrefutable patterns:

```
{-# OPTIONS_GHC -Wwarn=incomplete-uni-patterns #-}
```

This ensures that warnings are still emitted for the affected modules,
but prevents them from being promoted to errors by CI.
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/ghc-9.14 branch from 8f7006d to d6301cc Compare April 22, 2026 02:26
@jonathanknowles
Copy link
Copy Markdown
Contributor Author

@blamario wrote:

Option 0 seems best, with the OPTIONS_GHC pragmas

Thanks for the feedback!

I've updated the PR to implement this option.

@blamario
Copy link
Copy Markdown
Owner

Thanks and sorry for nitpicks. Are you waiting for a new Hackage release?

@blamario blamario merged commit d3e4322 into blamario:master Apr 22, 2026
14 checks passed
@jonathanknowles
Copy link
Copy Markdown
Contributor Author

Thanks and sorry for nitpicks.

No worries at all. Nitpicks are always welcome!

Are you waiting for a new Hackage release?

I'm not waiting or blocked, as the latest Hackage version already compiles with GHC 9.14.

But since the tested-with list has been updated, perhaps a revision would still be worthwhile? (Are there tools out there that rely on this?)

@jonathanknowles jonathanknowles deleted the jonathanknowles/ghc-9.14 branch April 22, 2026 03:15
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 for GHC 9.14.

2 participants