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

Epoch interval instances #3946

Merged
merged 1 commit into from
Dec 22, 2023
Merged

Epoch interval instances #3946

merged 1 commit into from
Dec 22, 2023

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Dec 18, 2023

Description

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

@lehins lehins force-pushed the lehins/epoch-interval-instances branch from 469686a to 46cabca Compare December 19, 2023 01:07
@lehins lehins enabled auto-merge December 19, 2023 01:08
@lehins lehins requested a review from TimSheard December 21, 2023 18:47
Copy link
Contributor

@TimSheard TimSheard left a comment

Choose a reason for hiding this comment

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

This looks good. Originally there was no Num instance for EpochInterval, but one for EpochNo. This required a lot of code like "3" becomes "EpochInterval 3"
So while a bit more code is required, it does add some safety guarantees.

@lehins lehins force-pushed the lehins/epoch-interval-instances branch from 46cabca to c41edc4 Compare December 22, 2023 00:34
@lehins lehins merged commit 6909685 into master Dec 22, 2023
8 of 9 checks passed
@neilmayhew neilmayhew deleted the lehins/epoch-interval-instances branch March 8, 2024 21:07
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.

2 participants