diff --git a/cardano-api/internal/Cardano/Api/Feature.hs b/cardano-api/internal/Cardano/Api/Feature.hs index 1d983890c8..e0d5114e5d 100644 --- a/cardano-api/internal/Cardano/Api/Feature.hs +++ b/cardano-api/internal/Cardano/Api/Feature.hs @@ -29,6 +29,16 @@ class FeatureInEra (feature :: Type -> Type) where -> CardanoEra era -- ^ Era to check -> a -- ^ The value to use +instance FeatureInEra ShelleyBasedEra where + featureInEra no yes = \case + ByronEra -> no + ShelleyEra -> yes ShelleyBasedEraShelley + AllegraEra -> yes ShelleyBasedEraAllegra + MaryEra -> yes ShelleyBasedEraMary + AlonzoEra -> yes ShelleyBasedEraAlonzo + BabbageEra -> yes ShelleyBasedEraBabbage + ConwayEra -> yes ShelleyBasedEraConway + -- | Determine the value to use for a feature in a given 'ShelleyBasedEra'. featureInShelleyBasedEra :: () => FeatureInEra feature