-
Notifications
You must be signed in to change notification settings - Fork 23
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 Classy versions of Era witness functions #537
Conversation
cc @newhoggy who is the main author of the |
Any opinions on this @newhoggy ? |
cc @carbolymer |
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.
Looks good, left a few remarks about naming things
class IsAllegraEraOnwards era where | ||
allegraEraOnwards :: AllegraEraOnwards era |
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 class is similar to IsShelleyBasedEra
in Cardano.Api.Eon.ShelleyBasedEra
. I propose two things:
- Move it to
Cardano.Api.Eon.AlonzoEraOnwards
- Rename it, to keep things consistent:
class IsAllegraEraOnwards era where | |
allegraEraOnwards :: AllegraEraOnwards era | |
class IsAllegraBasedEra era where | |
allegraBasedEra :: AllegraEraOnwards era |
ShelleyBasedEra
things are quite proliferated in CLI and testnet so it would make more sense to stick to this naming convention instead of using eon-like (ShelleyEraOnwards
) imo.
|
||
-- | Type class to produce 'AlonzoEraOnwards' witness values while staying | ||
-- parameterized by era. | ||
class IsAlonzoEraOnwards era where |
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.
same remark as for IsAllegraEraOnwards
|
||
-- | Type class to produce 'BabbageEraOnwards' witness values while staying | ||
-- parameterized by era. | ||
class IsBabbageEraOnwards era where |
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.
same remark as for IsAllegraEraOnwards
|
||
-- | Type class to produce 'MaryEraOnwards' witness values while staying | ||
-- parameterized by era. | ||
class IsMaryEraOnwards era where |
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.
same remark as for IsAllegraEraOnwards
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.
I think this should go to Cardano.Api.Script
058936a
to
b6914a5
Compare
FYI: I have rebased your branch because we have done changes to the formatting. I have made a copy of the unrebased branch here: backup/locallycompact/classy |
556176b
to
481f8fb
Compare
@carbolymer Could I get a re-review on this? |
bc67ede
to
859fe6d
Compare
71fd98b
to
43fa311
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.
LGTM! Thanks!
Closing as it was duplicated in #585 (which I can sign, since it's on this repo; instead of a clone). |
Pull request was closed
Changelog
Context
Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist