{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} module Test.Gen.Cardano.Api.Era ( shelleyBasedEraTestConstraints , shelleyToBabbageEraTestConstraints , conwayEraOnwardsTestConstraints ) where import Cardano.Api hiding (txIns) import Cardano.Api.Shelley import qualified Cardano.Ledger.BaseTypes as Ledger import qualified Cardano.Ledger.Core as Ledger import qualified Data.Functor.Identity as Ledger import Test.Cardano.Ledger.Conway.Arbitrary () import Test.Cardano.Ledger.Core.Arbitrary () import Test.QuickCheck (Arbitrary (..)) shelleyBasedEraTestConstraints :: () => ShelleyBasedEra era -> ( ( Ledger.Era (ShelleyLedgerEra era) , Arbitrary (Ledger.PParamsHKD Ledger.StrictMaybe (ShelleyLedgerEra era)) , Arbitrary (Ledger.PParamsHKD Ledger.Identity (ShelleyLedgerEra era)) ) => a ) -> a shelleyBasedEraTestConstraints :: forall era a. ShelleyBasedEra era -> ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a shelleyBasedEraTestConstraints = \case ShelleyBasedEra era ShelleyBasedEraShelley -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyBasedEra era ShelleyBasedEraAllegra -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyBasedEra era ShelleyBasedEraMary -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyBasedEra era ShelleyBasedEraAlonzo -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyBasedEra era ShelleyBasedEraBabbage -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyBasedEra era ShelleyBasedEraConway -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id shelleyToBabbageEraTestConstraints :: () => ShelleyToBabbageEra era -> ( ( Ledger.Era (ShelleyLedgerEra era) , Arbitrary (Ledger.PParamsHKD Ledger.StrictMaybe (ShelleyLedgerEra era)) , Arbitrary (Ledger.PParamsHKD Ledger.Identity (ShelleyLedgerEra era)) ) => a ) -> a shelleyToBabbageEraTestConstraints :: forall era a. ShelleyToBabbageEra era -> ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a shelleyToBabbageEraTestConstraints = \case ShelleyToBabbageEra era ShelleyToBabbageEraShelley -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyToBabbageEra era ShelleyToBabbageEraAllegra -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyToBabbageEra era ShelleyToBabbageEraMary -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyToBabbageEra era ShelleyToBabbageEraAlonzo -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id ShelleyToBabbageEra era ShelleyToBabbageEraBabbage -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id conwayEraOnwardsTestConstraints :: () => ConwayEraOnwards era -> ( ( Ledger.Era (ShelleyLedgerEra era) , Arbitrary (Ledger.PParamsHKD Ledger.StrictMaybe (ShelleyLedgerEra era)) , Arbitrary (Ledger.PParamsHKD Ledger.Identity (ShelleyLedgerEra era)) ) => a ) -> a conwayEraOnwardsTestConstraints :: forall era a. ConwayEraOnwards era -> ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a conwayEraOnwardsTestConstraints = \case ConwayEraOnwards era ConwayEraOnwardsConway -> a -> a ((Era (ShelleyLedgerEra era), Arbitrary (PParamsHKD StrictMaybe (ShelleyLedgerEra era)), Arbitrary (PParamsHKD Identity (ShelleyLedgerEra era))) => a) -> a forall a. a -> a id