Skip to content

Conversation

@erikd
Copy link
Contributor

@erikd erikd commented Oct 14, 2025

Description

Ghc-9.14 support. Currently using ghc-9.14.0.1.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Self-reviewed the diff

@erikd erikd requested review from a team and lehins as code owners October 14, 2025 03:59
@erikd erikd marked this pull request as draft October 14, 2025 03:59
@erikd erikd force-pushed the erikd/ghc-9.14 branch 3 times, most recently from 9e02039 to 8675a08 Compare October 14, 2025 23:14
@erikd
Copy link
Contributor Author

erikd commented Oct 14, 2025

Have no idea what the fourmolu check is complaining about. Maybe it does not like CPP. When I run it locally it does not make any changes but exits with error code 102 like it does in CI.

Copy link
Collaborator

@lehins lehins left a comment

Choose a reason for hiding this comment

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

Same comment about CPP as in IntersectMBO/cardano-ledger#5292

@erikd erikd force-pushed the erikd/ghc-9.14 branch 2 times, most recently from 8cd204c to 7345cf3 Compare January 12, 2026 01:24
@erikd
Copy link
Contributor Author

erikd commented Jan 19, 2026

Same comment about CPP as in IntersectMBO/cardano-ledger#5292

Good suggestion. Looking into it now.

@erikd erikd force-pushed the erikd/ghc-9.14 branch 4 times, most recently from 056d59a to 87eecb9 Compare January 19, 2026 04:45
@erikd
Copy link
Contributor Author

erikd commented Jan 19, 2026

The cabal-format test is failing due to having added comments to the allow-newer statements.

I added:

if impl(ghc >=9.14)
  allow-newer:
    -- https://github.com/haskell/aeson/issues/1155
    , aeson:base
    , aeson:bytestring
    , aeson:deepseq
    , aeson:ghc-prim
    , aeson:template-haskell
    , aeson:time

    -- https://github.com/haskellari/binary-orphans/issues/67
    , binary-orphans:base

    -- https://github.com/phadej/boring/issues/48
    , boring:base

and cabal-format reformats it as:

if impl(ghc >=9.14)
  allow-newer:
    -- https://github.com/haskell/aeson/issues/1155
    -- https://github.com/haskellari/binary-orphans/issues/67
    -- https://github.com/phadej/boring/issues/48
    , aeson:base
    , aeson:bytestring
    , aeson:deepseq
    , aeson:ghc-prim
    , aeson:template-haskell
    , aeson:time
    , binary-orphans:base
    , boring:base

which is just dumb.

@erikd erikd marked this pull request as ready for review January 19, 2026 06:04
@erikd erikd requested a review from nfrisby as a code owner January 19, 2026 06:04
@erikd erikd changed the title Preliminary ghc-9.14 support Support ghc-9.14 Jan 19, 2026
@erikd erikd force-pushed the erikd/ghc-9.14 branch 5 times, most recently from 90a86fb to 83f99f4 Compare January 21, 2026 22:32
@lehins
Copy link
Collaborator

lehins commented Jan 22, 2026

which is just dumb.

Unfortunately cabal formatting tool isn't capable of handling comments very well, limitation of the tool itself that we can't really do anything about.

Before merging the PR if some of those allow-newers are still needed, instead of bunch of links to other repos as comments it is better to create an actual ticket on this reposiory and that issue would link to all of those other issues on other repos.

Until it is ready to be merged cabal formatting CI check isn't that important anyways

erikd added 3 commits January 27, 2026 11:43
Ghc-9.14 gives redundant constraint warnings on constraints that
were NECESSARY with earlier versions of GHC.

Neatest solution is ghc implementation predicate in the cabal
files like that adds the redundant constraint warning for
compilers before 9.14:

  if impl (ghc < 9.14)
    ghc-options:
      -Wredundant-constraints

I tried adding a redundant constraint to a type class instance
and compiling with `ghc-9.12` and a valid redundant constraint
warning was issued.
@erikd
Copy link
Contributor Author

erikd commented Jan 27, 2026

Created issue #613 to track alllow-newer issue.

Have removed the commits from the cabal.project file.

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.

3 participants