Move definitions for all eras into a special place in cardano-ledger-core
#5069
Labels
💳 technical-debt
Issues related to technical debt we introduced
There is at least one limitation in GHC which requires to have access to the era type before the era type is actually defined, namely for definition of
COMPLETE
pragmas for native scripts and certificates (see #4613)The only solution I can think of is to move all definitions of
ShelleyEra
,AllegraEra
, ... tocardano-ledger-core
. That, however is quite dangerous, because:TranslateEra AllegraEra DState
incardano-ledger-shelley
package.For these reasons we need to stash those definitions in a special place and allow access to them only under extreme circumstances. There is no automated mechanism that would provide such protection for us, so we'll need to:
internal
sub-library in thecardano-ledger-core:internal:Cardano.Ledger.Internal.Era
module, thus describing the internal nature.internal
location.internal
sub-library for external developers, There is never a reason for any external package to directly import those definitions from theinternal
sub-library, since they will still be available from their respective modules where they are exported from today, namelyCardano.Ledger.[Era]
module.The text was updated successfully, but these errors were encountered: