-
Notifications
You must be signed in to change notification settings - Fork 154
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
Split type classes out of eras Core module #3924
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lehins
force-pushed
the
lehins/split-out-era-core
branch
5 times, most recently
from
December 13, 2023 02:47
9b17ea4
to
9e9797d
Compare
lehins
force-pushed
the
lehins/split-out-era-core
branch
3 times, most recently
from
December 13, 2023 19:56
72a13ba
to
873a0a7
Compare
teodanciu
reviewed
Dec 13, 2023
teodanciu
reviewed
Dec 13, 2023
teodanciu
approved these changes
Dec 14, 2023
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 to me. And nice to have all these deprecated stuff removed.
…tsVKey` from `Cardano.Ledger.Keys`
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
* Move core type class definitions to modules where instances are defined. * Remove unnecessary re-exports * Remove derpecated functions
lehins
force-pushed
the
lehins/split-out-era-core
branch
from
December 14, 2023 00:33
873a0a7
to
f329c33
Compare
lehins
force-pushed
the
lehins/split-out-era-core
branch
from
December 14, 2023 01:00
f329c33
to
b0bde65
Compare
* types, type classes and functions * Import all Core instances into Core modules
lehins
force-pushed
the
lehins/split-out-era-core
branch
from
December 14, 2023 01:18
b0bde65
to
a907695
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The idea of defining all core classes in a single module have proved to be a suboptimal and not always possible. Quite often it resulted in cyclic module dependency issues, which usually could be worked around, but not always.
Major goal of this PR is to move class definitions to their respective modules (eg,
BabbageEraTxOut
intoCardano.Ledger.Babbage.TxOut
), while still re-exporting all of the core classes from the core modules. In other words dependency direction is inverted when it comes to the Core modules.Along with this restructure, some of the re-exportations have been cleaned up and a bunch of deprecated functions have been removed. All of which have been noted in the CHANGELOGs
cardano-ledger-core
:Cardano.Ledger.Keys
to hidden moduleCardano.Ledger.Keys.Internal
and re-export all three modules fromCardano.Ledger.Keys
Cardano.Ledger.Keys.Internal
Cardano.Ledger.Keys.Bootstrap
Cardano.Ledger.Keys.WitsVKey
cardano-ledger-shelley/marry/allegra/alonzo/babbage/conway
:[Era]Era[Type]
: fromCardano.Ledger.[Era].Core
toCardano.Ledger.[Era].[Type]
. For example moveShelleyEraTxBody
: fromCardano.Ledger.Shelley.Core
toCardano.Ledger.Shelley.TxBody
Cardano.Ledger.[Era].Core
Cardano.Ledger.[Era].Core
internal PParams hkd* lenses and type families. Only export dedicated lenses for dealing withPParams
andPParamsUpdate
, not thePParamsHKD
PoolParams
orShelleyEraTxOut
fromCardano.Ledger.Shelley.TxBody
)In other words, there are no semantic changes in this PR, just reorganization. One small exception is the
ToJSON
instances forPoolVotingThresholds
andDRepVotingThreshold
where implemented manually instead of deriving usingDeriveAnyClass
.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
)