From ec044440a3391319586e9e53459278d1d933a850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 14 Nov 2024 16:06:45 +0100 Subject: [PATCH] Add instance ToCardanoEra Exp.Era --- cardano-api/internal/Cardano/Api/Experimental/Eras.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cardano-api/internal/Cardano/Api/Experimental/Eras.hs b/cardano-api/internal/Cardano/Api/Experimental/Eras.hs index b0c8f9cb9e..34fb30c718 100644 --- a/cardano-api/internal/Cardano/Api/Experimental/Eras.hs +++ b/cardano-api/internal/Cardano/Api/Experimental/Eras.hs @@ -234,6 +234,12 @@ instance Eon Era where Api.BabbageEra -> f BabbageEra _ -> v +-- | A temporary compatibility instance, for easier conversion between experimental and old API. +instance Api.ToCardanoEra Era where + toCardanoEra = \case + BabbageEra -> Api.BabbageEra + ConwayEra -> Api.ConwayEra + obtainCommonConstraints :: Era era -> (EraCommonConstraints era => a)