-
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
Convert CertState
to a type family
#4861
base: master
Are you sure you want to change the base?
Conversation
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 did a quick skim over the PR and it looks awesome.
There is one important point that I made that will need to be address that has to do with a common issue of changes getting lost during rebasing, but that shouldn't be too hard.
I'll do a proper review once the PR is out of the Draft state.
where | ||
type CertState era = (r :: Type) | r -> era | ||
|
||
mkCertState :: VState era -> PState era -> DState era -> CertState 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.
For this PR this is totally fine, but just heads up for the future adjustments that we'll need to make we won't be able to construct it like that because VState
will not be available.
This isn't really a problem since we can always construct it from an empty CertState, eg:
mkShelleyCertState pState dState =
def & certPStateL .~ pState
& certDStateL .~ dState
mkConwayCertState pState dState vState =
mkConwayCertState pState dState & certVStateL .~ vState
Moreover in ledger rules we can always get away with modifying CertState
, instead of constructing a new one.
Again, for this PR it will be fine to keep it as is, I am just giving you a heads up for the follow up work that we'll have to do.
libs/cardano-ledger-core/testlib/Test/Cardano/Ledger/Core/Arbitrary.hs
Outdated
Show resolved
Hide resolved
a1a2f56
to
46d8265
Compare
46d8265
to
ca2e001
Compare
Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
Description
Checklist
CHANGELOG.md
files updated for packages with externally visible changesNew section is never added with the code changes. (See RELEASING.md)
.cabal
andCHANGELOG.md
files when necessary, according to theversioning process.
.cabal
files updated when necessaryIf you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
scripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
updated (usescripts/gen-hie.sh
)