{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module Cardano.Api.Eras
(
ByronEra
, ShelleyEra
, AllegraEra
, MaryEra
, AlonzoEra
, BabbageEra
, CardanoEra(..)
, IsCardanoEra(..)
, AnyCardanoEra(..)
, anyCardanoEra
, InAnyCardanoEra(..)
, Byron
, Shelley
, Allegra
, Mary
, ShelleyBasedEra(..)
, IsShelleyBasedEra(..)
, InAnyShelleyBasedEra(..)
, shelleyBasedToCardanoEra
, ShelleyLedgerEra
, CardanoEraStyle(..)
, cardanoEraStyle
, AsType(AsByronEra, AsShelleyEra, AsAllegraEra, AsMaryEra, AsAlonzoEra, AsBabbageEra,
AsByron, AsShelley, AsAllegra, AsMary, AsAlonzo, AsBabbage)
) where
import Prelude
import Cardano.Api.HasTypeProxy
import Data.Aeson (FromJSON (..), ToJSON, toJSON, withText)
import qualified Data.Text as Text
import Data.Type.Equality (TestEquality (..), (:~:) (Refl))
import Ouroboros.Consensus.Shelley.Eras as Consensus (StandardAllegra, StandardAlonzo,
StandardBabbage, StandardMary, StandardShelley)
data ByronEra
data ShelleyEra
data AllegraEra
data MaryEra
data AlonzoEra
data BabbageEra
instance HasTypeProxy ByronEra where
data AsType ByronEra = AsByronEra
proxyToAsType :: Proxy ByronEra -> AsType ByronEra
proxyToAsType Proxy ByronEra
_ = AsType ByronEra
AsByronEra
instance HasTypeProxy ShelleyEra where
data AsType ShelleyEra = AsShelleyEra
proxyToAsType :: Proxy ShelleyEra -> AsType ShelleyEra
proxyToAsType Proxy ShelleyEra
_ = AsType ShelleyEra
AsShelleyEra
instance HasTypeProxy AllegraEra where
data AsType AllegraEra = AsAllegraEra
proxyToAsType :: Proxy AllegraEra -> AsType AllegraEra
proxyToAsType Proxy AllegraEra
_ = AsType AllegraEra
AsAllegraEra
instance HasTypeProxy MaryEra where
data AsType MaryEra = AsMaryEra
proxyToAsType :: Proxy MaryEra -> AsType MaryEra
proxyToAsType Proxy MaryEra
_ = AsType MaryEra
AsMaryEra
instance HasTypeProxy AlonzoEra where
data AsType AlonzoEra = AsAlonzoEra
proxyToAsType :: Proxy AlonzoEra -> AsType AlonzoEra
proxyToAsType Proxy AlonzoEra
_ = AsType AlonzoEra
AsAlonzoEra
instance HasTypeProxy BabbageEra where
data AsType BabbageEra = AsBabbageEra
proxyToAsType :: Proxy BabbageEra -> AsType BabbageEra
proxyToAsType Proxy BabbageEra
_ = AsType BabbageEra
AsBabbageEra
type Byron = ByronEra
type Shelley = ShelleyEra
type Allegra = AllegraEra
type Mary = MaryEra
{-# DEPRECATED Byron "Use 'ByronEra' or 'ByronAddr' as appropriate" #-}
{-# DEPRECATED Shelley "Use 'ShelleyEra' or 'ShelleyAddr' as appropriate" #-}
{-# DEPRECATED Allegra "Use 'AllegraEra' instead" #-}
{-# DEPRECATED Mary "Use 'MaryEra' instead" #-}
pattern AsByron :: AsType ByronEra
pattern $bAsByron :: AsType ByronEra
$mAsByron :: forall r. AsType ByronEra -> (Void# -> r) -> (Void# -> r) -> r
AsByron = AsByronEra
pattern AsShelley :: AsType ShelleyEra
pattern $bAsShelley :: AsType ShelleyEra
$mAsShelley :: forall r. AsType ShelleyEra -> (Void# -> r) -> (Void# -> r) -> r
AsShelley = AsShelleyEra
pattern AsAllegra :: AsType AllegraEra
pattern $bAsAllegra :: AsType AllegraEra
$mAsAllegra :: forall r. AsType AllegraEra -> (Void# -> r) -> (Void# -> r) -> r
AsAllegra = AsAllegraEra
pattern AsMary :: AsType MaryEra
pattern $bAsMary :: AsType MaryEra
$mAsMary :: forall r. AsType MaryEra -> (Void# -> r) -> (Void# -> r) -> r
AsMary = AsMaryEra
pattern AsAlonzo :: AsType AlonzoEra
pattern $bAsAlonzo :: AsType AlonzoEra
$mAsAlonzo :: forall r. AsType AlonzoEra -> (Void# -> r) -> (Void# -> r) -> r
AsAlonzo = AsAlonzoEra
pattern AsBabbage :: AsType BabbageEra
pattern $bAsBabbage :: AsType BabbageEra
$mAsBabbage :: forall r. AsType BabbageEra -> (Void# -> r) -> (Void# -> r) -> r
AsBabbage = AsBabbageEra
{-# DEPRECATED AsByron "Use 'AsByronEra' instead" #-}
{-# DEPRECATED AsShelley "Use 'AsShelleyEra' instead" #-}
{-# DEPRECATED AsAllegra "Use 'AsAllegraEra' instead" #-}
{-# DEPRECATED AsMary "Use 'AsMaryEra' instead" #-}
data CardanoEra era where
ByronEra :: CardanoEra ByronEra
ShelleyEra :: CardanoEra ShelleyEra
AllegraEra :: CardanoEra AllegraEra
MaryEra :: CardanoEra MaryEra
AlonzoEra :: CardanoEra AlonzoEra
BabbageEra :: CardanoEra BabbageEra
deriving instance Eq (CardanoEra era)
deriving instance Ord (CardanoEra era)
deriving instance Show (CardanoEra era)
instance ToJSON (CardanoEra era) where
toJSON :: CardanoEra era -> Value
toJSON CardanoEra era
ByronEra = Value
"Byron"
toJSON CardanoEra era
ShelleyEra = Value
"Shelley"
toJSON CardanoEra era
AllegraEra = Value
"Allegra"
toJSON CardanoEra era
MaryEra = Value
"Mary"
toJSON CardanoEra era
AlonzoEra = Value
"Alonzo"
toJSON CardanoEra era
BabbageEra = Value
"Babbage"
instance TestEquality CardanoEra where
testEquality :: CardanoEra a -> CardanoEra b -> Maybe (a :~: b)
testEquality CardanoEra a
ByronEra CardanoEra b
ByronEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
ShelleyEra CardanoEra b
ShelleyEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
AllegraEra CardanoEra b
AllegraEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
MaryEra CardanoEra b
MaryEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
AlonzoEra CardanoEra b
AlonzoEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
BabbageEra CardanoEra b
BabbageEra = (a :~: a) -> Maybe (a :~: a)
forall a. a -> Maybe a
Just a :~: a
forall k (a :: k). a :~: a
Refl
testEquality CardanoEra a
_ CardanoEra b
_ = Maybe (a :~: b)
forall a. Maybe a
Nothing
class HasTypeProxy era => IsCardanoEra era where
cardanoEra :: CardanoEra era
instance IsCardanoEra ByronEra where
cardanoEra :: CardanoEra ByronEra
cardanoEra = CardanoEra ByronEra
ByronEra
instance IsCardanoEra ShelleyEra where
cardanoEra :: CardanoEra ShelleyEra
cardanoEra = CardanoEra ShelleyEra
ShelleyEra
instance IsCardanoEra AllegraEra where
cardanoEra :: CardanoEra AllegraEra
cardanoEra = CardanoEra AllegraEra
AllegraEra
instance IsCardanoEra MaryEra where
cardanoEra :: CardanoEra MaryEra
cardanoEra = CardanoEra MaryEra
MaryEra
instance IsCardanoEra AlonzoEra where
cardanoEra :: CardanoEra AlonzoEra
cardanoEra = CardanoEra AlonzoEra
AlonzoEra
instance IsCardanoEra BabbageEra where
cardanoEra :: CardanoEra BabbageEra
cardanoEra = CardanoEra BabbageEra
BabbageEra
data AnyCardanoEra where
AnyCardanoEra :: IsCardanoEra era
=> CardanoEra era
-> AnyCardanoEra
deriving instance Show AnyCardanoEra
instance Eq AnyCardanoEra where
AnyCardanoEra CardanoEra era
era == :: AnyCardanoEra -> AnyCardanoEra -> Bool
== AnyCardanoEra CardanoEra era
era' =
case CardanoEra era -> CardanoEra era -> Maybe (era :~: era)
forall k (f :: k -> *) (a :: k) (b :: k).
TestEquality f =>
f a -> f b -> Maybe (a :~: b)
testEquality CardanoEra era
era CardanoEra era
era' of
Maybe (era :~: era)
Nothing -> Bool
False
Just era :~: era
Refl -> Bool
True
instance Bounded AnyCardanoEra where
minBound :: AnyCardanoEra
minBound = CardanoEra ByronEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ByronEra
ByronEra
maxBound :: AnyCardanoEra
maxBound = CardanoEra BabbageEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra BabbageEra
BabbageEra
instance Enum AnyCardanoEra where
enumFrom :: AnyCardanoEra -> [AnyCardanoEra]
enumFrom AnyCardanoEra
e = AnyCardanoEra -> AnyCardanoEra -> [AnyCardanoEra]
forall a. Enum a => a -> a -> [a]
enumFromTo AnyCardanoEra
e AnyCardanoEra
forall a. Bounded a => a
maxBound
fromEnum :: AnyCardanoEra -> Int
fromEnum = \case
AnyCardanoEra CardanoEra era
ByronEra -> Int
0
AnyCardanoEra CardanoEra era
ShelleyEra -> Int
1
AnyCardanoEra CardanoEra era
AllegraEra -> Int
2
AnyCardanoEra CardanoEra era
MaryEra -> Int
3
AnyCardanoEra CardanoEra era
AlonzoEra -> Int
4
AnyCardanoEra CardanoEra era
BabbageEra -> Int
5
toEnum :: Int -> AnyCardanoEra
toEnum = \case
Int
0 -> CardanoEra ByronEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ByronEra
ByronEra
Int
1 -> CardanoEra ShelleyEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ShelleyEra
ShelleyEra
Int
2 -> CardanoEra AllegraEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AllegraEra
AllegraEra
Int
3 -> CardanoEra MaryEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra MaryEra
MaryEra
Int
4 -> CardanoEra AlonzoEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AlonzoEra
AlonzoEra
Int
5 -> CardanoEra BabbageEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra BabbageEra
BabbageEra
Int
n ->
String -> AnyCardanoEra
forall a. HasCallStack => String -> a
error (String -> AnyCardanoEra) -> String -> AnyCardanoEra
forall a b. (a -> b) -> a -> b
$
String
"AnyCardanoEra.toEnum: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Int -> String
forall a. Show a => a -> String
show Int
n
String -> ShowS
forall a. Semigroup a => a -> a -> a
<> String
" does not correspond to any known enumerated era."
instance ToJSON AnyCardanoEra where
toJSON :: AnyCardanoEra -> Value
toJSON (AnyCardanoEra CardanoEra era
era) = CardanoEra era -> Value
forall a. ToJSON a => a -> Value
toJSON CardanoEra era
era
instance FromJSON AnyCardanoEra where
parseJSON :: Value -> Parser AnyCardanoEra
parseJSON = String
-> (Text -> Parser AnyCardanoEra) -> Value -> Parser AnyCardanoEra
forall a. String -> (Text -> Parser a) -> Value -> Parser a
withText String
"AnyCardanoEra"
((Text -> Parser AnyCardanoEra) -> Value -> Parser AnyCardanoEra)
-> (Text -> Parser AnyCardanoEra) -> Value -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ \case
Text
"Byron" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra ByronEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ByronEra
ByronEra
Text
"Shelley" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra ShelleyEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ShelleyEra
ShelleyEra
Text
"Allegra" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra AllegraEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AllegraEra
AllegraEra
Text
"Mary" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra MaryEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra MaryEra
MaryEra
Text
"Alonzo" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra AlonzoEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AlonzoEra
AlonzoEra
Text
"Babbage" -> AnyCardanoEra -> Parser AnyCardanoEra
forall (f :: * -> *) a. Applicative f => a -> f a
pure (AnyCardanoEra -> Parser AnyCardanoEra)
-> AnyCardanoEra -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ CardanoEra BabbageEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra BabbageEra
BabbageEra
Text
wrong -> String -> Parser AnyCardanoEra
forall (m :: * -> *) a. MonadFail m => String -> m a
fail (String -> Parser AnyCardanoEra) -> String -> Parser AnyCardanoEra
forall a b. (a -> b) -> a -> b
$ String
"Failed to parse unknown era: " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Text -> String
Text.unpack Text
wrong
anyCardanoEra :: CardanoEra era -> AnyCardanoEra
anyCardanoEra :: CardanoEra era -> AnyCardanoEra
anyCardanoEra CardanoEra era
ByronEra = CardanoEra ByronEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ByronEra
ByronEra
anyCardanoEra CardanoEra era
ShelleyEra = CardanoEra ShelleyEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra ShelleyEra
ShelleyEra
anyCardanoEra CardanoEra era
AllegraEra = CardanoEra AllegraEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AllegraEra
AllegraEra
anyCardanoEra CardanoEra era
MaryEra = CardanoEra MaryEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra MaryEra
MaryEra
anyCardanoEra CardanoEra era
AlonzoEra = CardanoEra AlonzoEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra AlonzoEra
AlonzoEra
anyCardanoEra CardanoEra era
BabbageEra = CardanoEra BabbageEra -> AnyCardanoEra
forall era. IsCardanoEra era => CardanoEra era -> AnyCardanoEra
AnyCardanoEra CardanoEra BabbageEra
BabbageEra
data InAnyCardanoEra thing where
InAnyCardanoEra :: IsCardanoEra era
=> CardanoEra era
-> thing era
-> InAnyCardanoEra thing
data ShelleyBasedEra era where
ShelleyBasedEraShelley :: ShelleyBasedEra ShelleyEra
ShelleyBasedEraAllegra :: ShelleyBasedEra AllegraEra
ShelleyBasedEraMary :: ShelleyBasedEra MaryEra
ShelleyBasedEraAlonzo :: ShelleyBasedEra AlonzoEra
ShelleyBasedEraBabbage :: ShelleyBasedEra BabbageEra
deriving instance Eq (ShelleyBasedEra era)
deriving instance Ord (ShelleyBasedEra era)
deriving instance Show (ShelleyBasedEra era)
class IsCardanoEra era => IsShelleyBasedEra era where
shelleyBasedEra :: ShelleyBasedEra era
instance IsShelleyBasedEra ShelleyEra where
shelleyBasedEra :: ShelleyBasedEra ShelleyEra
shelleyBasedEra = ShelleyBasedEra ShelleyEra
ShelleyBasedEraShelley
instance IsShelleyBasedEra AllegraEra where
shelleyBasedEra :: ShelleyBasedEra AllegraEra
shelleyBasedEra = ShelleyBasedEra AllegraEra
ShelleyBasedEraAllegra
instance IsShelleyBasedEra MaryEra where
shelleyBasedEra :: ShelleyBasedEra MaryEra
shelleyBasedEra = ShelleyBasedEra MaryEra
ShelleyBasedEraMary
instance IsShelleyBasedEra AlonzoEra where
shelleyBasedEra :: ShelleyBasedEra AlonzoEra
shelleyBasedEra = ShelleyBasedEra AlonzoEra
ShelleyBasedEraAlonzo
instance IsShelleyBasedEra BabbageEra where
shelleyBasedEra :: ShelleyBasedEra BabbageEra
shelleyBasedEra = ShelleyBasedEra BabbageEra
ShelleyBasedEraBabbage
data InAnyShelleyBasedEra thing where
InAnyShelleyBasedEra :: IsShelleyBasedEra era
=> ShelleyBasedEra era
-> thing era
-> InAnyShelleyBasedEra thing
shelleyBasedToCardanoEra :: ShelleyBasedEra era -> CardanoEra era
shelleyBasedToCardanoEra :: ShelleyBasedEra era -> CardanoEra era
shelleyBasedToCardanoEra ShelleyBasedEra era
ShelleyBasedEraShelley = CardanoEra era
CardanoEra ShelleyEra
ShelleyEra
shelleyBasedToCardanoEra ShelleyBasedEra era
ShelleyBasedEraAllegra = CardanoEra era
CardanoEra AllegraEra
AllegraEra
shelleyBasedToCardanoEra ShelleyBasedEra era
ShelleyBasedEraMary = CardanoEra era
CardanoEra MaryEra
MaryEra
shelleyBasedToCardanoEra ShelleyBasedEra era
ShelleyBasedEraAlonzo = CardanoEra era
CardanoEra AlonzoEra
AlonzoEra
shelleyBasedToCardanoEra ShelleyBasedEra era
ShelleyBasedEraBabbage = CardanoEra era
CardanoEra BabbageEra
BabbageEra
data CardanoEraStyle era where
LegacyByronEra :: CardanoEraStyle ByronEra
ShelleyBasedEra :: IsShelleyBasedEra era
=> ShelleyBasedEra era
-> CardanoEraStyle era
deriving instance Eq (CardanoEraStyle era)
deriving instance Ord (CardanoEraStyle era)
deriving instance Show (CardanoEraStyle era)
cardanoEraStyle :: CardanoEra era -> CardanoEraStyle era
cardanoEraStyle :: CardanoEra era -> CardanoEraStyle era
cardanoEraStyle CardanoEra era
ByronEra = CardanoEraStyle era
CardanoEraStyle ByronEra
LegacyByronEra
cardanoEraStyle CardanoEra era
ShelleyEra = ShelleyBasedEra ShelleyEra -> CardanoEraStyle ShelleyEra
forall era.
IsShelleyBasedEra era =>
ShelleyBasedEra era -> CardanoEraStyle era
ShelleyBasedEra ShelleyBasedEra ShelleyEra
ShelleyBasedEraShelley
cardanoEraStyle CardanoEra era
AllegraEra = ShelleyBasedEra AllegraEra -> CardanoEraStyle AllegraEra
forall era.
IsShelleyBasedEra era =>
ShelleyBasedEra era -> CardanoEraStyle era
ShelleyBasedEra ShelleyBasedEra AllegraEra
ShelleyBasedEraAllegra
cardanoEraStyle CardanoEra era
MaryEra = ShelleyBasedEra MaryEra -> CardanoEraStyle MaryEra
forall era.
IsShelleyBasedEra era =>
ShelleyBasedEra era -> CardanoEraStyle era
ShelleyBasedEra ShelleyBasedEra MaryEra
ShelleyBasedEraMary
cardanoEraStyle CardanoEra era
AlonzoEra = ShelleyBasedEra AlonzoEra -> CardanoEraStyle AlonzoEra
forall era.
IsShelleyBasedEra era =>
ShelleyBasedEra era -> CardanoEraStyle era
ShelleyBasedEra ShelleyBasedEra AlonzoEra
ShelleyBasedEraAlonzo
cardanoEraStyle CardanoEra era
BabbageEra = ShelleyBasedEra BabbageEra -> CardanoEraStyle BabbageEra
forall era.
IsShelleyBasedEra era =>
ShelleyBasedEra era -> CardanoEraStyle era
ShelleyBasedEra ShelleyBasedEra BabbageEra
ShelleyBasedEraBabbage
type family ShelleyLedgerEra era where
ShelleyLedgerEra ShelleyEra = Consensus.StandardShelley
ShelleyLedgerEra AllegraEra = Consensus.StandardAllegra
ShelleyLedgerEra MaryEra = Consensus.StandardMary
ShelleyLedgerEra AlonzoEra = Consensus.StandardAlonzo
ShelleyLedgerEra BabbageEra = Consensus.StandardBabbage