Skip to content

Conversation

@erikd
Copy link
Contributor

@erikd erikd commented Sep 16, 2025

Description

Preliminary ghc 9.14 support

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@erikd erikd requested a review from a team as a code owner September 16, 2025 04:19
@erikd
Copy link
Contributor Author

erikd commented Sep 16, 2025

I ran scripts/fourmolize.sh and it changed the formating of a bunch of stuff that I had not touched and seemingly does not handle the CPP I needed to get this compiling.

I ran scripts/gen-hie.sh but all it did was delete the entire contents of the hie.yaml file.

@erikd erikd marked this pull request as draft September 16, 2025 10:55
@erikd erikd force-pushed the erikd/ghc-9.14 branch 4 times, most recently from 4caf7a2 to 2f9f42c Compare September 17, 2025 02:37
@erikd erikd force-pushed the erikd/ghc-9.14 branch 4 times, most recently from 72fb4af to 9597702 Compare October 22, 2025 00:59
@erikd erikd force-pushed the erikd/ghc-9.14 branch 3 times, most recently from 81d27c3 to ff460d5 Compare October 31, 2025 09:19
@erikd erikd force-pushed the erikd/ghc-9.14 branch 4 times, most recently from d186d46 to e59ead7 Compare November 10, 2025 02:27
@erikd erikd force-pushed the erikd/ghc-9.14 branch 3 times, most recently from 5333ff1 to f3525d7 Compare November 16, 2025 22:05
@erikd erikd force-pushed the erikd/ghc-9.14 branch 2 times, most recently from 57e001b to dfdf088 Compare November 25, 2025 04:22
@erikd erikd force-pushed the erikd/ghc-9.14 branch 2 times, most recently from 908f4fb to fe69daf Compare December 4, 2025 00:19
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.

I looked at the PR and got really scared by all CPP in it.
We ought to resort to CPP only when we absolutely have to. In this case it doesn't look like it is the case, hence I left a couple of comments with suggestions on how we can get rid of them.


deriving instance
( Era era
#if __GLASGOW_HASKELL__ < 914
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of adding CPP all over the place for this, it is better to disable the warning -fno-warn-redundant-constraints in cabal.project file for ghc-9.14

This incompatibility will result in a mere warning, not a build failure. Since ghc-9.14 is not going to be a default compiler for some time, we don't need to add all this ugliness just to get rid of a warning. Once we decide to switch to ghc-9.14, all we'll need to do is just remove the redundant constraints and we'll be done with it.

Comment on lines +14 to +24
#if __GLASGOW_HASKELL__ >= 914
data SpendingPurpose,
data MintingPurpose,
data CertifyingPurpose,
data RewardingPurpose,
#else
pattern SpendingPurpose,
pattern MintingPurpose,
pattern CertifyingPurpose,
pattern RewardingPurpose,
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

@erikd Could you please tell me why would we add 1K lines of CPP code for new data syntax where pattern keyword still works fine? Please revert all those changes so we don't have to suffer each time we deal with pattern synonyms

Suggested change
#if __GLASGOW_HASKELL__ >= 914
data SpendingPurpose,
data MintingPurpose,
data CertifyingPurpose,
data RewardingPurpose,
#else
pattern SpendingPurpose,
pattern MintingPurpose,
pattern CertifyingPurpose,
pattern RewardingPurpose,
#endif
pattern SpendingPurpose,
pattern MintingPurpose,
pattern CertifyingPurpose,
pattern RewardingPurpose,

@erikd erikd force-pushed the erikd/ghc-9.14 branch 2 times, most recently from 2c5ec68 to e8a1606 Compare December 10, 2025 21:26
Currently using ghc-9.14.0.20251128 (-rc3).
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