cardano-ledger-core-1.19.0.0: Core components of Cardano ledgers from the Shelley release on.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Internal.Definition.Era

Synopsis

Documentation

class (Typeable era, KnownNat (ProtVerLow era), KnownNat (ProtVerHigh era), ProtVerLow era <= ProtVerHigh era, MinVersion <= ProtVerLow era, MinVersion <= ProtVerHigh era, CmpNat (ProtVerLow era) MaxVersion ~ 'LT, CmpNat (ProtVerHigh era) MaxVersion ~ 'LT) ⇒ Era era where Source #

Minimal complete definition

Nothing

Associated Types

type EraName era ∷ Symbol Source #

type PreviousEra era = (r ∷ Type) | r → era Source #

Map an era to its predecessor.

For example:

type instance PreviousEra AllegraEra = ShelleyEra

type ProtVerLow era ∷ Nat Source #

Lowest major protocol version for this era

type ProtVerHigh era ∷ Nat Source #

Highest major protocol version for this era. By default se to ProtVerLow

type ProtVerHigh era = ProtVerLow era

Methods

eraNameString Source #

Textual name of the current era.

Designed to be used with TypeApplications:

>>> eraName @ByronEra
"Byron"

default eraNameKnownSymbol (EraName era) ⇒ String Source #

Instances

Instances details
Era AllegraEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era AlonzoEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era BabbageEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era ConwayEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era DijkstraEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

Era MaryEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraName MaryEraSymbol Source #

type PreviousEra MaryEra = (r ∷ Type) Source #

type ProtVerLow MaryEraNat Source #

type ProtVerHigh MaryEraNat Source #

Methods

eraNameString Source #

Era ShelleyEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

class (KnownSymbol eraName, Era (EraFromName eraName), EraName (EraFromName eraName) ~ eraName) ⇒ EraHasName eraName Source #

This class exists in order to be able to derive the protocol version range for an era from its name. It is achieved by the means of injective definition of an era type from its name. This effectively closes the world for eras to only the ones that are deined in this module, however it does have to be that way. In other words, if there is ever a need to define custom eras that build on top of existing ledger eras, then we will need to remove injectivity from this type class as well as from the PreviousEra type family.

Associated Types

type EraFromName eraName = (era ∷ Type) | era → eraName Source #

Instances

Instances details
EraHasName "Allegra" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Allegra" = (era ∷ Type) Source #

EraHasName "Alonzo" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Alonzo" = (era ∷ Type) Source #

EraHasName "Babbage" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Babbage" = (era ∷ Type) Source #

EraHasName "Byron" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Byron" = (era ∷ Type) Source #

EraHasName "Conway" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Conway" = (era ∷ Type) Source #

EraHasName "Dijkstra" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Dijkstra" = (era ∷ Type) Source #

EraHasName "Mary" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Mary" = (era ∷ Type) Source #

EraHasName "Shelley" Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Associated Types

type EraFromName "Shelley" = (era ∷ Type) Source #

data ByronEra Source #

This is the era that preceded Shelley era. It cannot have any other class instances, except for Era type class.

Instances

Instances details
Era ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

Methods

eraNameString Source #

type EraName ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

type EraName ByronEra = "Byron"
type PreviousEra ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

type ProtVerHigh ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era

type ProtVerLow ByronEra Source # 
Instance details

Defined in Cardano.Ledger.Internal.Definition.Era