-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add extra type-safety to ensure that all predicate failures have roundtrip tests #4152
Conversation
ac88a3b
to
fe1161f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great!!! 😃
libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Binary/RoundTrip.hs
Outdated
Show resolved
Hide resolved
e4a91e6
to
ad43c74
Compare
936fae5
to
d967111
Compare
d967111
to
a7f9ed0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Exactly what I envisioned. However, we need the same testing for all previous eras as well not just Conway.
bc89a50
to
d260713
Compare
d260713
to
a782c8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
3ba1d94
to
fe394c1
Compare
…ialization-tests Add extra type-safety to ensure that all predicate failures have roundtrip tests
Description
This PR adds the
RuleListEra
typeclass, which has an associated type level list with all the (fallible) rules in that era. This gives us a closed world view of the rules and that makes it easier to write tests that iterate over each rule. SeeroundTripAllPredicateFailures
for an example.resolves #3866
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.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)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)