Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take care of all compiler warnings for GHC-9.8 #4426

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

neilmayhew
Copy link
Contributor

@neilmayhew neilmayhew commented Jun 19, 2024

Description

There are new warnings in ghc 9.8 for partial functions and orphan type family instances. This fixes the warnings and re-enables -Werror for all ghc versions.

Closes #3990

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • 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)
  • 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)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@neilmayhew
Copy link
Contributor Author

I don't really like enabling -Wno-orphans in larger modules that have a lot of other code in them, but the three affected modules are all in cardano-ledger-test so I didn't think it was worth trying to move the instances to a better place. However, I could look into this if it would be helpful.

@neilmayhew neilmayhew force-pushed the neilmayhew/3990-ghc-9.8-Werror branch from 765aaea to 528104e Compare June 19, 2024 16:22
Copy link
Contributor

@Lucsanszky Lucsanszky left a comment

Choose a reason for hiding this comment

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

LGTM! This should be good to go once it's rebased (and the new warnings are resolved). 👍

libs/plutus-preprocessor/src/Debug.hs Show resolved Hide resolved
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.

Beautiful!
Thank you!

@neilmayhew neilmayhew merged commit 45df347 into master Jun 19, 2024
125 checks passed
@neilmayhew neilmayhew deleted the neilmayhew/3990-ghc-9.8-Werror branch June 19, 2024 18:28
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.

Take care of all compiler warnings for GHC-9.8
3 participants