From 3c1308c4a5bc6c43ab095c56a607c92b60adcba9 Mon Sep 17 00:00:00 2001 From: John Ky Date: Fri, 20 Oct 2023 01:22:52 +1100 Subject: [PATCH] New shelleyToAlonzoEraToShelleyToBabbageEra function --- cardano-api/internal/Cardano/Api/Eras/Case.hs | 10 ++++++++++ cardano-api/src/Cardano/Api.hs | 9 ++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Eras/Case.hs b/cardano-api/internal/Cardano/Api/Eras/Case.hs index 7192c39590..6b3b631fea 100644 --- a/cardano-api/internal/Cardano/Api/Eras/Case.hs +++ b/cardano-api/internal/Cardano/Api/Eras/Case.hs @@ -32,6 +32,7 @@ module Cardano.Api.Eras.Case -- Conversions , shelleyToAllegraEraToByronToAllegraEra + , shelleyToAlonzoEraToShelleyToBabbageEra , alonzoEraOnlyToAlonzoEraOnwards , alonzoEraOnwardsToMaryEraOnwards , babbageEraOnwardsToMaryEraOnwards @@ -254,6 +255,15 @@ shelleyToAllegraEraToByronToAllegraEra = \case ShelleyToAllegraEraShelley -> ByronToAllegraEraShelley ShelleyToAllegraEraAllegra -> ByronToAllegraEraAllegra +shelleyToAlonzoEraToShelleyToBabbageEra :: () + => ShelleyToAlonzoEra era + -> ShelleyToBabbageEra era +shelleyToAlonzoEraToShelleyToBabbageEra = \case + ShelleyToAlonzoEraShelley -> ShelleyToBabbageEraShelley + ShelleyToAlonzoEraAllegra -> ShelleyToBabbageEraAllegra + ShelleyToAlonzoEraMary -> ShelleyToBabbageEraMary + ShelleyToAlonzoEraAlonzo -> ShelleyToBabbageEraAlonzo + alonzoEraOnwardsToMaryEraOnwards :: () => AlonzoEraOnwards era -> MaryEraOnwards era diff --git a/cardano-api/src/Cardano/Api.hs b/cardano-api/src/Cardano/Api.hs index 156fca8aa4..cbfd138bec 100644 --- a/cardano-api/src/Cardano/Api.hs +++ b/cardano-api/src/Cardano/Api.hs @@ -166,15 +166,18 @@ module Cardano.Api ( caseAlonzoOnlyOrBabbageEraOnwards, -- ** Eon relaxation + + -- *** for AlonzoEraOnly shelleyToAllegraEraToByronToAllegraEra, + shelleyToAlonzoEraToShelleyToBabbageEra, - -- *** Case on AlonzoEraOnly + -- *** for AlonzoEraOnly alonzoEraOnlyToAlonzoEraOnwards, - -- *** Case on AlonzoEraOnwards + -- *** for AlonzoEraOnwards alonzoEraOnwardsToMaryEraOnwards, - -- *** Case on BabbageEraOnwards + -- *** for BabbageEraOnwards babbageEraOnwardsToMaryEraOnwards, babbageEraOnwardsToAlonzoEraOnwards,