{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-orphans #-}
module Test.Consensus.Cardano.Generators (module Test.Consensus.Byron.Generators) where
import qualified Data.Map.Strict as Map
import Data.Maybe (catMaybes, fromMaybe)
import Data.Proxy
import Data.SOP.BasicFunctors
import Data.SOP.Index
import Data.SOP.NonEmpty
import Data.SOP.Sing
import Data.SOP.Strict
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Byron.Ledger
import Ouroboros.Consensus.Cardano.Block
import Ouroboros.Consensus.Cardano.Node (CardanoHardForkConstraints)
import Ouroboros.Consensus.HardFork.Combinator
import Ouroboros.Consensus.HardFork.Combinator.Serialisation
import qualified Ouroboros.Consensus.HardFork.History as History
import Ouroboros.Consensus.HeaderValidation
import Ouroboros.Consensus.Node.NetworkProtocolVersion
import Ouroboros.Consensus.Node.Serialisation (Some (..))
import Ouroboros.Consensus.Protocol.TPraos (TPraos)
import Ouroboros.Consensus.Shelley.Ledger
import Ouroboros.Consensus.Shelley.Ledger.Block ()
import Ouroboros.Consensus.Shelley.Ledger.SupportsProtocol ()
import Ouroboros.Consensus.TypeFamilyWrappers
import Test.Cardano.Ledger.Alonzo.Serialisation.Generators ()
import Test.Cardano.Ledger.Conway.Arbitrary ()
import Test.Consensus.Byron.Generators
import Test.Consensus.Cardano.MockCrypto
import Test.Consensus.Protocol.Serialisation.Generators ()
import Test.Consensus.Shelley.Generators
import Test.Consensus.Shelley.MockCrypto (CanMock)
import Test.QuickCheck
import Test.Util.Orphans.Arbitrary ()
import Test.Util.Serialisation.Roundtrip (Coherent (..),
WithVersion (..))
instance Arbitrary (CardanoBlock MockCryptoCompatByron) where
arbitrary :: Gen (CardanoBlock MockCryptoCompatByron)
arbitrary =
[Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron)
forall a. HasCallStack => [Gen a] -> Gen a
oneof ([Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron))
-> [Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron)
forall a b. (a -> b) -> a -> b
$ [Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)]
forall a. [Maybe a] -> [a]
catMaybes ([Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)])
-> [Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)]
forall a b. (a -> b) -> a -> b
$ NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
-> CollapseTo NP (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
forall (xs :: [*]) a.
SListIN NP xs =>
NP (K a) xs -> CollapseTo NP a
forall k l (h :: (k -> *) -> l -> *) (xs :: l) a.
(HCollapse h, SListIN h xs) =>
h (K a) xs -> CollapseTo h a
hcollapse NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators
where
generators ::
NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators :: NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators =
(ByronBlock -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) ByronBlock
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ByronBlock -> CardanoBlock MockCryptoCompatByron
forall c. ByronBlock -> CardanoBlock c
BlockByron
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) ByronBlock
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
BlockShelley
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
BlockAllegra
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
BlockMary
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
BlockAlonzo
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
BlockBabbage
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
BlockConway
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
-> NP (K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))) '[]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP (K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))) '[]
forall {k} (f :: k -> *). NP f '[]
Nil
mk ::
forall a x. Arbitrary a
=> (a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk :: forall a x.
Arbitrary a =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk a -> CardanoBlock MockCryptoCompatByron
f = Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
forall k a (b :: k). a -> K a b
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
forall a b. (a -> b) -> a -> b
$ Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
forall a. a -> Maybe a
Just (Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
-> Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
forall a b. (a -> b) -> a -> b
$ a -> CardanoBlock MockCryptoCompatByron
f (a -> CardanoBlock MockCryptoCompatByron)
-> Gen a -> Gen (CardanoBlock MockCryptoCompatByron)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen a
forall a. Arbitrary a => Gen a
arbitrary
instance Arbitrary (Coherent (CardanoBlock MockCryptoCompatByron)) where
arbitrary :: Gen (Coherent (CardanoBlock MockCryptoCompatByron))
arbitrary =
(CardanoBlock MockCryptoCompatByron
-> Coherent (CardanoBlock MockCryptoCompatByron))
-> Gen (CardanoBlock MockCryptoCompatByron)
-> Gen (Coherent (CardanoBlock MockCryptoCompatByron))
forall a b. (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap CardanoBlock MockCryptoCompatByron
-> Coherent (CardanoBlock MockCryptoCompatByron)
forall a. a -> Coherent a
Coherent (Gen (CardanoBlock MockCryptoCompatByron)
-> Gen (Coherent (CardanoBlock MockCryptoCompatByron)))
-> Gen (CardanoBlock MockCryptoCompatByron)
-> Gen (Coherent (CardanoBlock MockCryptoCompatByron))
forall a b. (a -> b) -> a -> b
$ [Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron)
forall a. HasCallStack => [Gen a] -> Gen a
oneof ([Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron))
-> [Gen (CardanoBlock MockCryptoCompatByron)]
-> Gen (CardanoBlock MockCryptoCompatByron)
forall a b. (a -> b) -> a -> b
$ [Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)]
forall a. [Maybe a] -> [a]
catMaybes ([Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)])
-> [Maybe (Gen (CardanoBlock MockCryptoCompatByron))]
-> [Gen (CardanoBlock MockCryptoCompatByron)]
forall a b. (a -> b) -> a -> b
$ NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
-> CollapseTo NP (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
forall (xs :: [*]) a.
SListIN NP xs =>
NP (K a) xs -> CollapseTo NP a
forall k l (h :: (k -> *) -> l -> *) (xs :: l) a.
(HCollapse h, SListIN h xs) =>
h (K a) xs -> CollapseTo h a
hcollapse NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators
where
generators ::
NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators :: NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
generators =
(ByronBlock -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) ByronBlock
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ByronBlock -> CardanoBlock MockCryptoCompatByron
forall c. ByronBlock -> CardanoBlock c
BlockByron
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) ByronBlock
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
(CardanoEras MockCryptoCompatByron)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
BlockShelley
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
BlockAllegra
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
BlockMary
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron),
ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
BlockAlonzo
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
BlockBabbage
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron),
ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* (ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)
-> CardanoBlock MockCryptoCompatByron
forall c. ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
BlockConway
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
-> NP (K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))) '[]
-> NP
(K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))))
'[ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP (K (Maybe (Gen (CardanoBlock MockCryptoCompatByron)))) '[]
forall {k} (f :: k -> *). NP f '[]
Nil
mk ::
forall a x. Arbitrary (Coherent a)
=> (a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk :: forall a x.
Arbitrary (Coherent a) =>
(a -> CardanoBlock MockCryptoCompatByron)
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
mk a -> CardanoBlock MockCryptoCompatByron
f = Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
forall k a (b :: k). a -> K a b
K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
-> K (Maybe (Gen (CardanoBlock MockCryptoCompatByron))) x
forall a b. (a -> b) -> a -> b
$ Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
forall a. a -> Maybe a
Just (Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron)))
-> Gen (CardanoBlock MockCryptoCompatByron)
-> Maybe (Gen (CardanoBlock MockCryptoCompatByron))
forall a b. (a -> b) -> a -> b
$ a -> CardanoBlock MockCryptoCompatByron
f (a -> CardanoBlock MockCryptoCompatByron)
-> (Coherent a -> a)
-> Coherent a
-> CardanoBlock MockCryptoCompatByron
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Coherent a -> a
forall a. Coherent a -> a
getCoherent (Coherent a -> CardanoBlock MockCryptoCompatByron)
-> Gen (Coherent a) -> Gen (CardanoBlock MockCryptoCompatByron)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Coherent a)
forall a. Arbitrary a => Gen a
arbitrary
instance Arbitrary (CardanoHeader MockCryptoCompatByron) where
arbitrary :: Gen (CardanoHeader MockCryptoCompatByron)
arbitrary = CardanoBlock MockCryptoCompatByron
-> CardanoHeader MockCryptoCompatByron
forall blk. GetHeader blk => blk -> Header blk
getHeader (CardanoBlock MockCryptoCompatByron
-> CardanoHeader MockCryptoCompatByron)
-> Gen (CardanoBlock MockCryptoCompatByron)
-> Gen (CardanoHeader MockCryptoCompatByron)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (CardanoBlock MockCryptoCompatByron)
forall a. Arbitrary a => Gen a
arbitrary
instance (CanMock (TPraos c) (ShelleyEra c), CardanoHardForkConstraints c)
=> Arbitrary (OneEraHash (CardanoEras c)) where
arbitrary :: Gen (OneEraHash (CardanoEras c))
arbitrary = NS WrapHeaderHash (CardanoEras c) -> OneEraHash (CardanoEras c)
inj (NS WrapHeaderHash (CardanoEras c) -> OneEraHash (CardanoEras c))
-> Gen (NS WrapHeaderHash (CardanoEras c))
-> Gen (OneEraHash (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (NS WrapHeaderHash (CardanoEras c))
forall a. Arbitrary a => Gen a
arbitrary
where
inj :: NS WrapHeaderHash (CardanoEras c) -> OneEraHash (CardanoEras c)
inj :: NS WrapHeaderHash (CardanoEras c) -> OneEraHash (CardanoEras c)
inj = NS (K (OneEraHash (CardanoEras c))) (CardanoEras c)
-> CollapseTo NS (OneEraHash (CardanoEras c))
NS (K (OneEraHash (CardanoEras c))) (CardanoEras c)
-> OneEraHash (CardanoEras c)
forall (xs :: [*]) a.
SListIN NS xs =>
NS (K a) xs -> CollapseTo NS a
forall k l (h :: (k -> *) -> l -> *) (xs :: l) a.
(HCollapse h, SListIN h xs) =>
h (K a) xs -> CollapseTo h a
hcollapse (NS (K (OneEraHash (CardanoEras c))) (CardanoEras c)
-> OneEraHash (CardanoEras c))
-> (NS WrapHeaderHash (CardanoEras c)
-> NS (K (OneEraHash (CardanoEras c))) (CardanoEras c))
-> NS WrapHeaderHash (CardanoEras c)
-> OneEraHash (CardanoEras c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Proxy SingleEraBlock
-> (forall a.
SingleEraBlock a =>
WrapHeaderHash a -> K (OneEraHash (CardanoEras c)) a)
-> NS WrapHeaderHash (CardanoEras c)
-> NS (K (OneEraHash (CardanoEras c))) (CardanoEras c)
forall {k} {l} (h :: (k -> *) -> l -> *) (c :: k -> Constraint)
(xs :: l) (proxy :: (k -> Constraint) -> *) (f :: k -> *)
(f' :: k -> *).
(AllN (Prod h) c xs, HAp h) =>
proxy c
-> (forall (a :: k). c a => f a -> f' a) -> h f xs -> h f' xs
hcmap Proxy SingleEraBlock
proxySingle WrapHeaderHash a -> K (OneEraHash (CardanoEras c)) a
forall a.
SingleEraBlock a =>
WrapHeaderHash a -> K (OneEraHash (CardanoEras c)) a
aux
aux ::
forall blk. SingleEraBlock blk
=> WrapHeaderHash blk -> K (OneEraHash (CardanoEras c)) blk
aux :: forall a.
SingleEraBlock a =>
WrapHeaderHash a -> K (OneEraHash (CardanoEras c)) a
aux = OneEraHash (CardanoEras c) -> K (OneEraHash (CardanoEras c)) blk
forall k a (b :: k). a -> K a b
K (OneEraHash (CardanoEras c) -> K (OneEraHash (CardanoEras c)) blk)
-> (WrapHeaderHash blk -> OneEraHash (CardanoEras c))
-> WrapHeaderHash blk
-> K (OneEraHash (CardanoEras c)) blk
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ShortByteString -> OneEraHash (CardanoEras c)
forall k (xs :: [k]). ShortByteString -> OneEraHash xs
OneEraHash (ShortByteString -> OneEraHash (CardanoEras c))
-> (WrapHeaderHash blk -> ShortByteString)
-> WrapHeaderHash blk
-> OneEraHash (CardanoEras c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Proxy blk -> HeaderHash blk -> ShortByteString
forall blk (proxy :: * -> *).
ConvertRawHash blk =>
proxy blk -> HeaderHash blk -> ShortByteString
forall (proxy :: * -> *).
proxy blk -> HeaderHash blk -> ShortByteString
toShortRawHash (forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @blk) (HeaderHash blk -> ShortByteString)
-> (WrapHeaderHash blk -> HeaderHash blk)
-> WrapHeaderHash blk
-> ShortByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WrapHeaderHash blk -> HeaderHash blk
forall blk. WrapHeaderHash blk -> HeaderHash blk
unwrapHeaderHash
instance (c ~ MockCryptoCompatByron, ShelleyBasedEra (ShelleyEra c))
=> Arbitrary (AnnTip (CardanoBlock c)) where
arbitrary :: Gen (AnnTip (CardanoBlock c))
arbitrary = SlotNo
-> BlockNo -> TipInfo (CardanoBlock c) -> AnnTip (CardanoBlock c)
SlotNo
-> BlockNo
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c)
forall blk. SlotNo -> BlockNo -> TipInfo blk -> AnnTip blk
AnnTip
(SlotNo
-> BlockNo
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c))
-> Gen SlotNo
-> Gen
(BlockNo
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Word64 -> SlotNo
SlotNo (Word64 -> SlotNo) -> Gen Word64 -> Gen SlotNo
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Word64
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(BlockNo
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c))
-> Gen BlockNo
-> Gen
(OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen BlockNo
forall a. Arbitrary a => Gen a
arbitrary
Gen
(OneEraTipInfo (CardanoEras MockCryptoCompatByron)
-> AnnTip (CardanoBlock c))
-> Gen (OneEraTipInfo (CardanoEras MockCryptoCompatByron))
-> Gen (AnnTip (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (NS WrapTipInfo (CardanoEras MockCryptoCompatByron)
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron)
forall (xs :: [*]). NS WrapTipInfo xs -> OneEraTipInfo xs
OneEraTipInfo (NS WrapTipInfo (CardanoEras MockCryptoCompatByron)
-> OneEraTipInfo (CardanoEras MockCryptoCompatByron))
-> Gen (NS WrapTipInfo (CardanoEras MockCryptoCompatByron))
-> Gen (OneEraTipInfo (CardanoEras MockCryptoCompatByron))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (NS WrapTipInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary)
instance CardanoHardForkConstraints c
=> Arbitrary (HardForkNodeToNodeVersion (CardanoEras c)) where
arbitrary :: Gen (HardForkNodeToNodeVersion (CardanoEras c))
arbitrary =
[HardForkNodeToNodeVersion (CardanoEras c)]
-> Gen (HardForkNodeToNodeVersion (CardanoEras c))
forall a. HasCallStack => [a] -> Gen a
elements ([HardForkNodeToNodeVersion (CardanoEras c)]
-> Gen (HardForkNodeToNodeVersion (CardanoEras c)))
-> [HardForkNodeToNodeVersion (CardanoEras c)]
-> Gen (HardForkNodeToNodeVersion (CardanoEras c))
forall a b. (a -> b) -> a -> b
$ Map NodeToNodeVersion (HardForkNodeToNodeVersion (CardanoEras c))
-> [HardForkNodeToNodeVersion (CardanoEras c)]
forall k a. Map k a -> [a]
Map.elems (Map NodeToNodeVersion (HardForkNodeToNodeVersion (CardanoEras c))
-> [HardForkNodeToNodeVersion (CardanoEras c)])
-> Map
NodeToNodeVersion (HardForkNodeToNodeVersion (CardanoEras c))
-> [HardForkNodeToNodeVersion (CardanoEras c)]
forall a b. (a -> b) -> a -> b
$ Proxy (CardanoBlock c)
-> Map NodeToNodeVersion (BlockNodeToNodeVersion (CardanoBlock c))
forall blk.
SupportedNetworkProtocolVersion blk =>
Proxy blk -> Map NodeToNodeVersion (BlockNodeToNodeVersion blk)
supportedNodeToNodeVersions (forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoBlock c))
deriving instance Arbitrary (BlockNodeToNodeVersion blk)
=> Arbitrary (WrapNodeToNodeVersion blk)
arbitraryNodeToNode ::
( Arbitrary (WithVersion ByronNodeToNodeVersion byron)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion mary)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage)
, Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)
)
=> (byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen (WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode :: forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode byron -> cardano
injByron shelley -> cardano
injShelley allegra -> cardano
injAllegra mary -> cardano
injMary alonzo -> cardano
injAlonzo babbage -> cardano
injBabbage conway -> cardano
injConway = [Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)]
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[
(\(WithVersion ByronNodeToNodeVersion
versionByron byron
b) ->
HardForkNodeToNodeVersion (CardanoEras c)
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(BlockNodeToNodeVersion ByronBlock
-> HardForkNodeToNodeVersion (CardanoEras c)
forall x (xs1 :: [*]).
BlockNodeToNodeVersion x -> HardForkNodeToNodeVersion (x : xs1)
HardForkNodeToNodeDisabled BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron)
(byron -> cardano
injByron byron
b))
(WithVersion ByronNodeToNodeVersion byron
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ByronNodeToNodeVersion byron)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (WithVersion ByronNodeToNodeVersion byron)
forall a. Arbitrary a => Gen a
arbitrary
, (\ (WithVersion ByronNodeToNodeVersion
versionByron byron
x) ShelleyNodeToNodeVersion
versionShelley ShelleyNodeToNodeVersion
versionAllegra ShelleyNodeToNodeVersion
versionMary ShelleyNodeToNodeVersion
versionAlonzo ShelleyNodeToNodeVersion
versionBabbage ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(byron -> cardano
injByron byron
x)
)
(WithVersion ByronNodeToNodeVersion byron
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ByronNodeToNodeVersion byron)
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (WithVersion ByronNodeToNodeVersion byron)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron (WithVersion ShelleyNodeToNodeVersion
versionShelley shelley
x) ShelleyNodeToNodeVersion
versionAllegra ShelleyNodeToNodeVersion
versionMary ShelleyNodeToNodeVersion
versionAlonzo ShelleyNodeToNodeVersion
versionBabbage ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(shelley -> cardano
injShelley shelley
x)
)
(ByronNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion shelley
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion shelley
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion shelley
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion shelley)
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion shelley)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron ShelleyNodeToNodeVersion
versionShelley (WithVersion ShelleyNodeToNodeVersion
versionAllegra allegra
x) ShelleyNodeToNodeVersion
versionMary ShelleyNodeToNodeVersion
versionAlonzo ShelleyNodeToNodeVersion
versionBabbage ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(allegra -> cardano
injAllegra allegra
x)
)
(ByronNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion allegra
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion allegra
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion allegra
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion allegra
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion allegra
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion allegra)
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion allegra)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron ShelleyNodeToNodeVersion
versionShelley ShelleyNodeToNodeVersion
versionAllegra (WithVersion ShelleyNodeToNodeVersion
versionMary mary
x) ShelleyNodeToNodeVersion
versionAlonzo ShelleyNodeToNodeVersion
versionBabbage ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(mary -> cardano
injMary mary
x)
)
(ByronNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion mary
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion mary)
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion mary)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron ShelleyNodeToNodeVersion
versionShelley ShelleyNodeToNodeVersion
versionAllegra ShelleyNodeToNodeVersion
versionMary (WithVersion ShelleyNodeToNodeVersion
versionAlonzo alonzo
x) ShelleyNodeToNodeVersion
versionBabbage ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(alonzo -> cardano
injAlonzo alonzo
x)
)
(ByronNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion alonzo
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion alonzo)
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion alonzo)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron ShelleyNodeToNodeVersion
versionShelley ShelleyNodeToNodeVersion
versionAllegra ShelleyNodeToNodeVersion
versionMary ShelleyNodeToNodeVersion
versionAlonzo (WithVersion ShelleyNodeToNodeVersion
versionBabbage babbage
x) ShelleyNodeToNodeVersion
versionConway ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(babbage -> cardano
injBabbage babbage
x)
)
(ByronNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion babbage
-> ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion babbage)
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion babbage)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary
, (\ ByronNodeToNodeVersion
versionByron ShelleyNodeToNodeVersion
versionShelley ShelleyNodeToNodeVersion
versionAllegra ShelleyNodeToNodeVersion
versionMary ShelleyNodeToNodeVersion
versionAlonzo ShelleyNodeToNodeVersion
versionBabbage (WithVersion ShelleyNodeToNodeVersion
versionConway conway
x) ->
BlockNodeToNodeVersion ByronBlock
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> cardano
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano
forall {x} {x} {x} {x} {x} {x} {x} {a}.
BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion ByronBlock
ByronNodeToNodeVersion
versionByron BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToNodeVersion
versionShelley BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToNodeVersion
versionAllegra BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToNodeVersion
versionMary BlockNodeToNodeVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToNodeVersion
versionAlonzo BlockNodeToNodeVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToNodeVersion
versionBabbage BlockNodeToNodeVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToNodeVersion
versionConway
(conway -> cardano
injConway conway
x)
)
(ByronNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToNodeVersion
-> WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToNodeVersion
-> Gen
(WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToNodeVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToNodeVersion conway
-> WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToNodeVersion conway)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToNodeVersion conway)
forall a. Arbitrary a => Gen a
arbitrary
]
where
distrib :: BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> BlockNodeToNodeVersion x
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
distrib BlockNodeToNodeVersion x
versionByron BlockNodeToNodeVersion x
versionShelley BlockNodeToNodeVersion x
versionAllegra BlockNodeToNodeVersion x
versionMary BlockNodeToNodeVersion x
versionAlonzo BlockNodeToNodeVersion x
versionBabbage BlockNodeToNodeVersion x
versionConway
a
x =
HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]
-> a
-> WithVersion (HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]) a
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToNodeVersion
-> NP WrapNodeToNodeVersion '[x, x, x, x, x, x, x]
-> HardForkNodeToNodeVersion '[x, x, x, x, x, x, x]
forall (xs :: [*]).
HardForkSpecificNodeToNodeVersion
-> NP WrapNodeToNodeVersion xs -> HardForkNodeToNodeVersion xs
HardForkNodeToNodeEnabled
HardForkSpecificNodeToNodeVersion
forall a. Bounded a => a
maxBound
( BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionByron
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x, x, x, x, x, x]
-> NP WrapNodeToNodeVersion '[x, x, x, x, x, x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionShelley
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x, x, x, x, x]
-> NP WrapNodeToNodeVersion '[x, x, x, x, x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionAllegra
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x, x, x, x]
-> NP WrapNodeToNodeVersion '[x, x, x, x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionMary
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x, x, x]
-> NP WrapNodeToNodeVersion '[x, x, x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionAlonzo
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x, x]
-> NP WrapNodeToNodeVersion '[x, x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionBabbage
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[x]
-> NP WrapNodeToNodeVersion '[x, x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToNodeVersion x -> WrapNodeToNodeVersion x
forall blk. BlockNodeToNodeVersion blk -> WrapNodeToNodeVersion blk
WrapNodeToNodeVersion BlockNodeToNodeVersion x
versionConway
WrapNodeToNodeVersion x
-> NP WrapNodeToNodeVersion '[] -> NP WrapNodeToNodeVersion '[x]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP WrapNodeToNodeVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
a
x
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c))
(SomeSecond (NestedCtxt Header) (CardanoBlock c))) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c))
(SomeSecond (NestedCtxt Header) (CardanoBlock c)))
arbitrary = (SomeSecond (NestedCtxt Header) ByronBlock
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> (SomeSecond
(NestedCtxt Header) (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c))
(SomeSecond (NestedCtxt Header) (CardanoBlock c)))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode SomeSecond (NestedCtxt Header) ByronBlock
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (blk : xs1))
injByron SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : blk : xs1))
injShelley SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : x : blk : xs1))
injAllegra SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {x} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : blk : xs1))
injMary SomeSecond
(NestedCtxt Header) (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {x} {x} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : blk : xs1))
injAlonzo SomeSecond
(NestedCtxt Header) (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {x} {x} {x} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : blk : xs1))
injBabbage SomeSecond
(NestedCtxt Header) (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond (NestedCtxt Header) (CardanoBlock c)
forall {f' :: * -> *} {blk} {x} {x} {x} {x} {x} {x} {xs1 :: [*]}.
SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : x : blk : xs1))
injConway
where
injByron :: SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (blk : xs1))
injByron = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ
injShelley :: SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : blk : xs1))
injShelley = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
injAllegra :: SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : x : blk : xs1))
injAllegra = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond (NestedCtxt f') (HardForkBlock (x : x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
injMary :: SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : blk : xs1))
injMary = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
injAlonzo :: SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : blk : xs1))
injAlonzo = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
injBabbage :: SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : blk : xs1))
injBabbage = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
injConway :: SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : x : blk : xs1))
injConway = (forall a.
NestedCtxt_ blk f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : x : blk : xs1)) f' a)
-> SomeSecond (NestedCtxt f') blk
-> SomeSecond
(NestedCtxt f') (HardForkBlock (x : x : x : x : x : x : blk : xs1))
forall blk (f :: * -> *) blk' (f' :: * -> *).
(forall a. NestedCtxt_ blk f a -> NestedCtxt_ blk' f' a)
-> SomeSecond (NestedCtxt f) blk -> SomeSecond (NestedCtxt f') blk'
mapSomeNestedCtxt (NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
-> NestedCtxt_
(HardForkBlock (x : x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall (xs1 :: [*]) (a :: * -> *) b x.
NestedCtxt_ (HardForkBlock xs1) a b
-> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCS (NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a)
-> (NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a)
-> NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (x : blk : xs1)) f' a
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NestedCtxt_ blk f' a
-> NestedCtxt_ (HardForkBlock (blk : xs1)) f' a
forall x (a :: * -> *) b (xs1 :: [*]).
NestedCtxt_ x a b -> NestedCtxt_ (HardForkBlock (x : xs1)) a b
NCZ)
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c))
(CardanoBlock c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoBlock c))
arbitrary = (ByronBlock -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c)
-> (ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c)
-> (ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c)
-> Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoBlock c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode ByronBlock -> CardanoBlock c
forall c. ByronBlock -> CardanoBlock c
BlockByron ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
BlockShelley ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
BlockAllegra ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
BlockMary ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
BlockAlonzo ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
forall c. ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
BlockBabbage ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
forall c. ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
BlockConway
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c))
(CardanoHeader c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoHeader c))
arbitrary = (Header ByronBlock -> CardanoHeader c)
-> (Header (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoHeader c)
-> (Header (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoHeader c)
-> (Header (ShelleyBlock (TPraos c) (MaryEra c))
-> CardanoHeader c)
-> (Header (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoHeader c)
-> (Header (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoHeader c)
-> (Header (ShelleyBlock (Praos c) (ConwayEra c))
-> CardanoHeader c)
-> Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoHeader c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode Header ByronBlock -> CardanoHeader c
forall c. Header ByronBlock -> CardanoHeader c
HeaderByron Header (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoHeader c
HeaderShelley Header (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoHeader c
HeaderAllegra Header (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoHeader c
HeaderMary Header (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoHeader c
HeaderAlonzo Header (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoHeader c
HeaderBabbage Header (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoHeader c
forall c.
Header (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoHeader c
HeaderConway
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c))
(CardanoGenTx c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTx c))
arbitrary = (GenTx ByronBlock -> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c)
-> Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTx c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode GenTx ByronBlock -> CardanoGenTx c
forall c. GenTx ByronBlock -> CardanoGenTx c
GenTxByron GenTx (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoGenTx c
GenTxShelley GenTx (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoGenTx c
GenTxAllegra GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c
GenTxMary GenTx (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTx c
GenTxAlonzo GenTx (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTx c
GenTxBabbage GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c
GenTxConway
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToNodeVersion (CardanoEras c))
(CardanoGenTxId c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTxId c))
arbitrary = (GenTxId ByronBlock -> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (TPraos c) (MaryEra c))
-> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoGenTxId c)
-> (GenTxId (ShelleyBlock (Praos c) (ConwayEra c))
-> CardanoGenTxId c)
-> Gen
(WithVersion
(HardForkNodeToNodeVersion (CardanoEras c)) (CardanoGenTxId c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToNodeVersion byron),
Arbitrary (WithVersion ShelleyNodeToNodeVersion shelley),
Arbitrary (WithVersion ShelleyNodeToNodeVersion allegra),
Arbitrary (WithVersion ShelleyNodeToNodeVersion mary),
Arbitrary (WithVersion ShelleyNodeToNodeVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToNodeVersion babbage),
Arbitrary (WithVersion ShelleyNodeToNodeVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToNodeVersion (CardanoEras c)) cardano)
arbitraryNodeToNode GenTxId ByronBlock -> CardanoGenTxId c
forall c. GenTxId ByronBlock -> CardanoGenTxId c
GenTxIdByron GenTxId (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoGenTxId c
GenTxIdShelley GenTxId (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoGenTxId c
GenTxIdAllegra GenTxId (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTxId c
GenTxIdMary GenTxId (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTxId c
GenTxIdAlonzo GenTxId (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTxId c
GenTxIdBabbage GenTxId (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTxId c
forall c.
GenTxId (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTxId c
GenTxIdConway
instance CardanoHardForkConstraints c
=> Arbitrary (HardForkNodeToClientVersion (CardanoEras c)) where
arbitrary :: Gen (HardForkNodeToClientVersion (CardanoEras c))
arbitrary =
[HardForkNodeToClientVersion (CardanoEras c)]
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall a. HasCallStack => [a] -> Gen a
elements ([HardForkNodeToClientVersion (CardanoEras c)]
-> Gen (HardForkNodeToClientVersion (CardanoEras c)))
-> [HardForkNodeToClientVersion (CardanoEras c)]
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall a b. (a -> b) -> a -> b
$ Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall k a. Map k a -> [a]
Map.elems (Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall a b. (a -> b) -> a -> b
$ Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (BlockNodeToClientVersion (CardanoBlock c))
forall blk.
SupportedNetworkProtocolVersion blk =>
Proxy blk -> Map NodeToClientVersion (BlockNodeToClientVersion blk)
supportedNodeToClientVersions (forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoBlock c))
newtype HardForkEnabledNodeToClientVersion c = HardForkEnabledNodeToClientVersion {
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion :: HardForkNodeToClientVersion (CardanoEras c)
}
deriving newtype instance CardanoHardForkConstraints c
=> Eq (HardForkEnabledNodeToClientVersion c)
deriving newtype instance CardanoHardForkConstraints c
=> Show (HardForkEnabledNodeToClientVersion c)
instance CardanoHardForkConstraints c
=> Arbitrary (HardForkEnabledNodeToClientVersion c) where
arbitrary :: Gen (HardForkEnabledNodeToClientVersion c)
arbitrary =
[HardForkEnabledNodeToClientVersion c]
-> Gen (HardForkEnabledNodeToClientVersion c)
forall a. HasCallStack => [a] -> Gen a
elements
([HardForkEnabledNodeToClientVersion c]
-> Gen (HardForkEnabledNodeToClientVersion c))
-> (Proxy (CardanoBlock c)
-> [HardForkEnabledNodeToClientVersion c])
-> Proxy (CardanoBlock c)
-> Gen (HardForkEnabledNodeToClientVersion c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (HardForkNodeToClientVersion (CardanoEras c)
-> HardForkEnabledNodeToClientVersion c)
-> [HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkEnabledNodeToClientVersion c]
forall a b. (a -> b) -> [a] -> [b]
map HardForkNodeToClientVersion (CardanoEras c)
-> HardForkEnabledNodeToClientVersion c
forall c.
HardForkNodeToClientVersion (CardanoEras c)
-> HardForkEnabledNodeToClientVersion c
HardForkEnabledNodeToClientVersion
([HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkEnabledNodeToClientVersion c])
-> (Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> Proxy (CardanoBlock c)
-> [HardForkEnabledNodeToClientVersion c]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (HardForkNodeToClientVersion (CardanoEras c) -> Bool)
-> [HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall a. (a -> Bool) -> [a] -> [a]
filter HardForkNodeToClientVersion (CardanoEras c) -> Bool
forall (xs :: [*]). HardForkNodeToClientVersion xs -> Bool
isHardForkNodeToClientEnabled
([HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> (Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall k a. Map k a -> [a]
Map.elems
(Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> (Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c)))
-> Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (BlockNodeToClientVersion (CardanoBlock c))
Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
forall blk.
SupportedNetworkProtocolVersion blk =>
Proxy blk -> Map NodeToClientVersion (BlockNodeToClientVersion blk)
supportedNodeToClientVersions
(Proxy (CardanoBlock c)
-> Gen (HardForkEnabledNodeToClientVersion c))
-> Proxy (CardanoBlock c)
-> Gen (HardForkEnabledNodeToClientVersion c)
forall a b. (a -> b) -> a -> b
$ forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoBlock c)
genWithHardForkSpecificNodeToClientVersion ::
forall c. CardanoHardForkConstraints c
=> (HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
genWithHardForkSpecificNodeToClientVersion :: forall c.
CardanoHardForkConstraints c =>
(HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
genWithHardForkSpecificNodeToClientVersion HardForkSpecificNodeToClientVersion -> Bool
p =
[HardForkNodeToClientVersion (CardanoEras c)]
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall a. HasCallStack => [a] -> Gen a
elements
([HardForkNodeToClientVersion (CardanoEras c)]
-> Gen (HardForkNodeToClientVersion (CardanoEras c)))
-> (Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> Proxy (CardanoBlock c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (HardForkNodeToClientVersion (CardanoEras c) -> Bool)
-> [HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall a. (a -> Bool) -> [a] -> [a]
filter HardForkNodeToClientVersion (CardanoEras c) -> Bool
p'
([HardForkNodeToClientVersion (CardanoEras c)]
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> (Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall k a. Map k a -> [a]
Map.elems
(Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
-> [HardForkNodeToClientVersion (CardanoEras c)])
-> (Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c)))
-> Proxy (CardanoBlock c)
-> [HardForkNodeToClientVersion (CardanoEras c)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (BlockNodeToClientVersion (CardanoBlock c))
Proxy (CardanoBlock c)
-> Map
NodeToClientVersion (HardForkNodeToClientVersion (CardanoEras c))
forall blk.
SupportedNetworkProtocolVersion blk =>
Proxy blk -> Map NodeToClientVersion (BlockNodeToClientVersion blk)
supportedNodeToClientVersions
(Proxy (CardanoBlock c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c)))
-> Proxy (CardanoBlock c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall a b. (a -> b) -> a -> b
$ forall t. Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoBlock c)
where
p' :: HardForkNodeToClientVersion (CardanoEras c) -> Bool
p' :: HardForkNodeToClientVersion (CardanoEras c) -> Bool
p' (HardForkNodeToClientEnabled HardForkSpecificNodeToClientVersion
v NP EraNodeToClientVersion (CardanoEras c)
_) = HardForkSpecificNodeToClientVersion -> Bool
p HardForkSpecificNodeToClientVersion
v
p' (HardForkNodeToClientDisabled {}) = Bool
False
instance Arbitrary (BlockNodeToClientVersion blk)
=> Arbitrary (EraNodeToClientVersion blk) where
arbitrary :: Gen (EraNodeToClientVersion blk)
arbitrary = [(Int, Gen (EraNodeToClientVersion blk))]
-> Gen (EraNodeToClientVersion blk)
forall a. HasCallStack => [(Int, Gen a)] -> Gen a
frequency
[ (Int
1, EraNodeToClientVersion blk -> Gen (EraNodeToClientVersion blk)
forall a. a -> Gen a
forall (f :: * -> *) a. Applicative f => a -> f a
pure EraNodeToClientVersion blk
forall blk. EraNodeToClientVersion blk
EraNodeToClientDisabled)
, (Int
9, BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled (BlockNodeToClientVersion blk -> EraNodeToClientVersion blk)
-> Gen (BlockNodeToClientVersion blk)
-> Gen (EraNodeToClientVersion blk)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (BlockNodeToClientVersion blk)
forall a. Arbitrary a => Gen a
arbitrary)
]
arbitraryNodeToClient ::
( Arbitrary (WithVersion ByronNodeToClientVersion byron)
, Arbitrary (WithVersion ShelleyNodeToClientVersion shelley)
, Arbitrary (WithVersion ShelleyNodeToClientVersion allegra)
, Arbitrary (WithVersion ShelleyNodeToClientVersion mary)
, Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo)
, Arbitrary (WithVersion ShelleyNodeToClientVersion babbage)
, Arbitrary (WithVersion ShelleyNodeToClientVersion conway)
)
=> (byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient :: forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient byron -> cardano
injByron shelley -> cardano
injShelley allegra -> cardano
injAllegra mary -> cardano
injMary alonzo -> cardano
injAlonzo babbage -> cardano
injBabbage conway -> cardano
injConway = [Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)]
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[ (\(WithVersion ByronNodeToClientVersion
versionByron byron
b) ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(BlockNodeToClientVersion ByronBlock
-> HardForkNodeToClientVersion (CardanoEras c)
forall x (xs1 :: [*]).
BlockNodeToClientVersion x -> HardForkNodeToClientVersion (x : xs1)
HardForkNodeToClientDisabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron)
(byron -> cardano
injByron byron
b))
(WithVersion ByronNodeToClientVersion byron
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ByronNodeToClientVersion byron)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (WithVersion ByronNodeToClientVersion byron)
forall a. Arbitrary a => Gen a
arbitrary
, (\(WithVersion ByronNodeToClientVersion
versionByron byron
b) ShelleyNodeToClientVersion
versionShelley EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
versionAllegra EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(byron -> cardano
injByron byron
b))
(WithVersion ByronNodeToClientVersion byron
-> ShelleyNodeToClientVersion
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ByronNodeToClientVersion byron)
-> Gen
(ShelleyNodeToClientVersion
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (WithVersion ByronNodeToClientVersion byron)
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron (WithVersion ShelleyNodeToClientVersion
versionShelley shelley
s) EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
versionAllegra EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(shelley -> cardano
injShelley shelley
s))
(ByronNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion shelley
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion shelley
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion shelley
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion shelley)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion shelley)
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron ShelleyNodeToClientVersion
versionShelley (WithVersion ShelleyNodeToClientVersion
versionAllegra allegra
a) EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToClientVersion
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(allegra -> cardano
injAllegra allegra
a))
(ByronNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion allegra
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion allegra
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion allegra
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion allegra
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion allegra
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion allegra)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion allegra)
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron ShelleyNodeToClientVersion
versionShelley ShelleyNodeToClientVersion
versionAllegra (WithVersion ShelleyNodeToClientVersion
versionMary mary
m) EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToClientVersion
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToClientVersion
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(mary -> cardano
injMary mary
m))
(ByronNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion mary
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion mary)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion mary)
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron ShelleyNodeToClientVersion
versionShelley ShelleyNodeToClientVersion
versionAllegra ShelleyNodeToClientVersion
versionMary (WithVersion ShelleyNodeToClientVersion
versionAlonzo alonzo
a) EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToClientVersion
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToClientVersion
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToClientVersion
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(alonzo -> cardano
injAlonzo alonzo
a))
(ByronNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion alonzo
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion alonzo)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion alonzo)
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron ShelleyNodeToClientVersion
versionShelley ShelleyNodeToClientVersion
versionAllegra ShelleyNodeToClientVersion
versionMary ShelleyNodeToClientVersion
versionAlonzo (WithVersion ShelleyNodeToClientVersion
versionBabbage babbage
a) EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToClientVersion
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToClientVersion
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToClientVersion
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToClientVersion
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(babbage -> cardano
injBabbage babbage
a))
(ByronNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion babbage
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion babbage)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion babbage)
forall a. Arbitrary a => Gen a
arbitrary Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen
(EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c)))
forall a. Arbitrary a => Gen a
arbitrary
, (\ByronNodeToClientVersion
versionByron ShelleyNodeToClientVersion
versionShelley ShelleyNodeToClientVersion
versionAllegra ShelleyNodeToClientVersion
versionMary ShelleyNodeToClientVersion
versionAlonzo ShelleyNodeToClientVersion
versionBabbage (WithVersion ShelleyNodeToClientVersion
versionConway conway
a) ->
HardForkNodeToClientVersion (CardanoEras c)
-> cardano
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion (CardanoEras c)
-> HardForkNodeToClientVersion (CardanoEras c)
forall (xs :: [*]).
HardForkSpecificNodeToClientVersion
-> NP EraNodeToClientVersion xs -> HardForkNodeToClientVersion xs
HardForkNodeToClientEnabled
HardForkSpecificNodeToClientVersion
forall a. Bounded a => a
maxBound
( BlockNodeToClientVersion ByronBlock
-> EraNodeToClientVersion ByronBlock
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion ByronBlock
ByronNodeToClientVersion
versionByron
EraNodeToClientVersion ByronBlock
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
-> NP EraNodeToClientVersion (CardanoEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
ShelleyNodeToClientVersion
versionShelley
EraNodeToClientVersion (ShelleyBlock (TPraos c) (ShelleyEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP EraNodeToClientVersion (CardanoShelleyEras c)
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
ShelleyNodeToClientVersion
versionAllegra
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AllegraEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AllegraEra c),
ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
ShelleyNodeToClientVersion
versionMary
EraNodeToClientVersion (ShelleyBlock (TPraos c) (MaryEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (MaryEra c),
ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
ShelleyNodeToClientVersion
versionAlonzo
EraNodeToClientVersion (ShelleyBlock (TPraos c) (AlonzoEra c))
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (TPraos c) (AlonzoEra c),
ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
ShelleyNodeToClientVersion
versionBabbage
EraNodeToClientVersion (ShelleyBlock (Praos c) (BabbageEra c))
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
-> NP
EraNodeToClientVersion
'[ShelleyBlock (Praos c) (BabbageEra c),
ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* BlockNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
forall blk.
BlockNodeToClientVersion blk -> EraNodeToClientVersion blk
EraNodeToClientEnabled BlockNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
ShelleyNodeToClientVersion
versionConway
EraNodeToClientVersion (ShelleyBlock (Praos c) (ConwayEra c))
-> NP EraNodeToClientVersion '[]
-> NP
EraNodeToClientVersion '[ShelleyBlock (Praos c) (ConwayEra c)]
forall {k} (f :: k -> *) (x :: k) (xs1 :: [k]).
f x -> NP f xs1 -> NP f (x : xs1)
:* NP EraNodeToClientVersion '[]
forall {k} (f :: k -> *). NP f '[]
Nil
))
(conway -> cardano
injConway conway
a))
(ByronNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ByronNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen ByronNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(ShelleyNodeToClientVersion
-> WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen ShelleyNodeToClientVersion
-> Gen
(WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen ShelleyNodeToClientVersion
forall a. Arbitrary a => Gen a
arbitrary Gen
(WithVersion ShelleyNodeToClientVersion conway
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) cardano)
-> Gen (WithVersion ShelleyNodeToClientVersion conway)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (WithVersion ShelleyNodeToClientVersion conway)
forall a. Arbitrary a => Gen a
arbitrary
]
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(CardanoBlock c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoBlock c))
arbitrary = (ByronBlock -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c)
-> (ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c)
-> (ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c)
-> (ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c)
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoBlock c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient ByronBlock -> CardanoBlock c
forall c. ByronBlock -> CardanoBlock c
BlockByron ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (ShelleyEra c) -> CardanoBlock c
BlockShelley ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (AllegraEra c) -> CardanoBlock c
BlockAllegra ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (MaryEra c) -> CardanoBlock c
BlockMary ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
forall c. ShelleyBlock (TPraos c) (AlonzoEra c) -> CardanoBlock c
BlockAlonzo ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
forall c. ShelleyBlock (Praos c) (BabbageEra c) -> CardanoBlock c
BlockBabbage ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
forall c. ShelleyBlock (Praos c) (ConwayEra c) -> CardanoBlock c
BlockConway
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(CardanoGenTx c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoGenTx c))
arbitrary = (GenTx ByronBlock -> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c)
-> (GenTx (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoGenTx c)
-> (GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c)
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoGenTx c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient GenTx ByronBlock -> CardanoGenTx c
forall c. GenTx ByronBlock -> CardanoGenTx c
GenTxByron GenTx (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (ShelleyEra c)) -> CardanoGenTx c
GenTxShelley GenTx (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (AllegraEra c)) -> CardanoGenTx c
GenTxAllegra GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (MaryEra c)) -> CardanoGenTx c
GenTxMary GenTx (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (TPraos c) (AlonzoEra c)) -> CardanoGenTx c
GenTxAlonzo GenTx (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (Praos c) (BabbageEra c)) -> CardanoGenTx c
GenTxBabbage GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c
forall c.
GenTx (ShelleyBlock (Praos c) (ConwayEra c)) -> CardanoGenTx c
GenTxConway
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c)) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
arbitrary = [(Int,
Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c)))]
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
forall a. HasCallStack => [(Int, Gen a)] -> Gen a
frequency
[ (Int
8, (ApplyMempoolPayloadErr -> CardanoApplyTxErr c)
-> (ApplyTxError (ShelleyEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> (ApplyTxError (AllegraEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> (ApplyTxError (MaryEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> (ApplyTxError (AlonzoEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> (ApplyTxError (BabbageEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> (ApplyTxError (ConwayEra MockCryptoCompatByron)
-> CardanoApplyTxErr c)
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient ApplyMempoolPayloadErr -> CardanoApplyTxErr c
ApplyTxErr ByronBlock -> CardanoApplyTxErr c
forall c. ApplyTxErr ByronBlock -> CardanoApplyTxErr c
ApplyTxErrByron ApplyTxError (ShelleyEra MockCryptoCompatByron)
-> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (TPraos c) (ShelleyEra c))
-> CardanoApplyTxErr c
ApplyTxErrShelley ApplyTxError (AllegraEra MockCryptoCompatByron)
-> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (TPraos c) (AllegraEra c))
-> CardanoApplyTxErr c
ApplyTxErrAllegra ApplyTxError (MaryEra MockCryptoCompatByron) -> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (TPraos c) (MaryEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (TPraos c) (MaryEra c))
-> CardanoApplyTxErr c
ApplyTxErrMary ApplyTxError (AlonzoEra MockCryptoCompatByron)
-> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (TPraos c) (AlonzoEra c))
-> CardanoApplyTxErr c
ApplyTxErrAlonzo ApplyTxError (BabbageEra MockCryptoCompatByron)
-> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (Praos c) (BabbageEra c))
-> CardanoApplyTxErr c
ApplyTxErrBabbage ApplyTxError (ConwayEra MockCryptoCompatByron)
-> CardanoApplyTxErr c
ApplyTxErr (ShelleyBlock (Praos c) (ConwayEra c))
-> CardanoApplyTxErr c
forall c.
ApplyTxErr (ShelleyBlock (Praos c) (ConwayEra c))
-> CardanoApplyTxErr c
ApplyTxErrConway)
, (Int
2, HardForkNodeToClientVersion (CardanoEras c)
-> CardanoApplyTxErr c
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> CardanoApplyTxErr c
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(CardanoApplyTxErr c
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(CardanoApplyTxErr c
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
-> Gen (CardanoApplyTxErr c)
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (MismatchEraInfo (CardanoEras c) -> CardanoApplyTxErr c
forall (xs :: [*]). MismatchEraInfo xs -> HardForkApplyTxErr xs
HardForkApplyTxErrWrongEra (MismatchEraInfo (CardanoEras c) -> CardanoApplyTxErr c)
-> Gen (MismatchEraInfo (CardanoEras c))
-> Gen (CardanoApplyTxErr c)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (MismatchEraInfo (CardanoEras c))
forall a. Arbitrary a => Gen a
arbitrary))
]
shrink :: WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)
-> [WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c)]
shrink = (CardanoApplyTxErr c -> [CardanoApplyTxErr c])
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c)) (CardanoApplyTxErr c)
-> [WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(CardanoApplyTxErr c)]
forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b)
-> WithVersion (HardForkNodeToClientVersion (CardanoEras c)) a
-> f (WithVersion (HardForkNodeToClientVersion (CardanoEras c)) b)
traverse CardanoApplyTxErr c -> [CardanoApplyTxErr c]
CardanoApplyTxErr MockCryptoCompatByron
-> [CardanoApplyTxErr MockCryptoCompatByron]
aux
where
aux :: CardanoApplyTxErr MockCryptoCompatByron
-> [CardanoApplyTxErr MockCryptoCompatByron]
aux :: CardanoApplyTxErr MockCryptoCompatByron
-> [CardanoApplyTxErr MockCryptoCompatByron]
aux (HardForkApplyTxErrFromEra (OneEraApplyTxErr NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
x)) =
OneEraApplyTxErr (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron
forall (xs :: [*]). OneEraApplyTxErr xs -> HardForkApplyTxErr xs
HardForkApplyTxErrFromEra (OneEraApplyTxErr (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron)
-> (NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
-> OneEraApplyTxErr (CardanoEras MockCryptoCompatByron))
-> NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
-> OneEraApplyTxErr (CardanoEras MockCryptoCompatByron)
forall (xs :: [*]). NS WrapApplyTxErr xs -> OneEraApplyTxErr xs
OneEraApplyTxErr (NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron)
-> [NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)]
-> [CardanoApplyTxErr MockCryptoCompatByron]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
-> [NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)]
forall a. Arbitrary a => a -> [a]
shrink NS WrapApplyTxErr (CardanoEras MockCryptoCompatByron)
x
aux (HardForkApplyTxErrWrongEra MismatchEraInfo (CardanoEras MockCryptoCompatByron)
x) =
MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron
forall (xs :: [*]). MismatchEraInfo xs -> HardForkApplyTxErr xs
HardForkApplyTxErrWrongEra (MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> CardanoApplyTxErr MockCryptoCompatByron)
-> [MismatchEraInfo (CardanoEras MockCryptoCompatByron)]
-> [CardanoApplyTxErr MockCryptoCompatByron]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> [MismatchEraInfo (CardanoEras MockCryptoCompatByron)]
forall a. Arbitrary a => a -> [a]
shrink MismatchEraInfo (CardanoEras MockCryptoCompatByron)
x
instance Arbitrary (Some QueryAnytime) where
arbitrary :: Gen (Some QueryAnytime)
arbitrary = Some QueryAnytime -> Gen (Some QueryAnytime)
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return (Some QueryAnytime -> Gen (Some QueryAnytime))
-> Some QueryAnytime -> Gen (Some QueryAnytime)
forall a b. (a -> b) -> a -> b
$ QueryAnytime (Maybe Bound) -> Some QueryAnytime
forall {k} (f :: k -> *) (a :: k). f a -> Some f
Some QueryAnytime (Maybe Bound)
GetEraStart
instance CardanoHardForkConstraints c
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
arbitrary = [(Int,
Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))))]
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a. HasCallStack => [(Int, Gen a)] -> Gen a
frequency
[ (Int
1, do HardForkNodeToClientVersion (CardanoEras c)
version <- HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary
WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return (WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a b. (a -> b) -> a -> b
$ HardForkNodeToClientVersion (CardanoEras c)
-> Some (QueryHardFork (CardanoEras c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
forall v a. v -> a -> WithVersion v a
WithVersion HardForkNodeToClientVersion (CardanoEras c)
version (QueryHardFork (CardanoEras c) (Interpreter (CardanoEras c))
-> Some (QueryHardFork (CardanoEras c))
forall {k} (f :: k -> *) (a :: k). f a -> Some f
Some QueryHardFork (CardanoEras c) (Interpreter (CardanoEras c))
forall (xs :: [*]). QueryHardFork xs (Interpreter xs)
GetInterpreter))
, (Int
1, do HardForkNodeToClientVersion (CardanoEras c)
version <- (HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall c.
CardanoHardForkConstraints c =>
(HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
genWithHardForkSpecificNodeToClientVersion
(HardForkSpecificNodeToClientVersion
-> HardForkSpecificNodeToClientVersion -> Bool
forall a. Ord a => a -> a -> Bool
>= HardForkSpecificNodeToClientVersion
HardForkSpecificNodeToClientVersion2)
WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return (WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a b. (a -> b) -> a -> b
$ HardForkNodeToClientVersion (CardanoEras c)
-> Some (QueryHardFork (CardanoEras c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
forall v a. v -> a -> WithVersion v a
WithVersion HardForkNodeToClientVersion (CardanoEras c)
version (QueryHardFork (CardanoEras c) (EraIndex (CardanoEras c))
-> Some (QueryHardFork (CardanoEras c))
forall {k} (f :: k -> *) (a :: k). f a -> Some f
Some QueryHardFork (CardanoEras c) (EraIndex (CardanoEras c))
forall (xs :: [*]). QueryHardFork xs (EraIndex xs)
GetCurrentEra))
]
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
arbitrary = [(Int,
Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))))]
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a. HasCallStack => [(Int, Gen a)] -> Gen a
frequency
[ (Int
1, (SomeSecond BlockQuery ByronBlock
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> (SomeSecond BlockQuery (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient SomeSecond BlockQuery ByronBlock
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery ByronBlock
-> SomeSecond BlockQuery (CardanoBlock c)
injByron SomeSecond BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injShelley SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injAllegra SomeSecond BlockQuery (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injMary SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injAlonzo SomeSecond BlockQuery (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injBabbage SomeSecond BlockQuery (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
SomeSecond BlockQuery (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injConway)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeByron (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeShelley (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeAllegra (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeMary (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeAlonzo (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeBabbage (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeSecond BlockQuery (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
forall {c}.
Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeConway (Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c))
-> Gen (Some QueryAnytime)
-> Gen (SomeSecond BlockQuery (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Some QueryAnytime)
forall a. Arbitrary a => Gen a
arbitrary))
, (Int
1, (Some (QueryHardFork (CardanoEras c))
-> SomeSecond BlockQuery (CardanoBlock c))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c))
forall a b.
(a -> b)
-> WithVersion (HardForkNodeToClientVersion (CardanoEras c)) a
-> WithVersion (HardForkNodeToClientVersion (CardanoEras c)) b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Some (QueryHardFork (CardanoEras c))
-> SomeSecond BlockQuery (CardanoBlock c)
forall {xs1 :: [*]} {x}.
IsNonEmpty xs1 =>
Some (QueryHardFork (x : xs1))
-> SomeSecond BlockQuery (HardForkBlock (x : xs1))
injHardFork (WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c)))
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeSecond BlockQuery (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(Some (QueryHardFork (CardanoEras c))))
forall a. Arbitrary a => Gen a
arbitrary)
]
where
injByron :: SomeSecond BlockQuery ByronBlock
-> SomeSecond BlockQuery (CardanoBlock c)
injByron (SomeSecond BlockQuery ByronBlock b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery ByronBlock b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery ByronBlock result -> CardanoQuery c a
QueryIfCurrentByron BlockQuery ByronBlock b
query)
injShelley :: SomeSecond BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injShelley (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
-> CardanoQuery c a
QueryIfCurrentShelley BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) b
query)
injAllegra :: SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injAllegra (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
-> CardanoQuery c a
QueryIfCurrentAllegra BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) b
query)
injMary :: SomeSecond BlockQuery (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injMary (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
-> CardanoQuery c a
QueryIfCurrentMary BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) b
query)
injAlonzo :: SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injAlonzo (SomeSecond BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
-> CardanoQuery c a
QueryIfCurrentAlonzo BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) b
query)
injBabbage :: SomeSecond BlockQuery (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injBabbage (SomeSecond BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
-> CardanoQuery c a
QueryIfCurrentBabbage BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) b
query)
injConway :: SomeSecond BlockQuery (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeSecond BlockQuery (CardanoBlock c)
injConway (SomeSecond BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) b
query) = BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) b
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c b)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
-> CardanoQuery c a
QueryIfCurrentConway BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) b
query)
injAnytimeByron :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeByron (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeByron QueryAnytime a
query)
injAnytimeShelley :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeShelley (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeShelley QueryAnytime a
query)
injAnytimeAllegra :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeAllegra (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeAllegra QueryAnytime a
query)
injAnytimeMary :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeMary (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeMary QueryAnytime a
query)
injAnytimeAlonzo :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeAlonzo (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeAlonzo QueryAnytime a
query)
injAnytimeBabbage :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeBabbage (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeBabbage QueryAnytime a
query)
injAnytimeConway :: Some QueryAnytime -> SomeSecond BlockQuery (CardanoBlock c)
injAnytimeConway (Some QueryAnytime a
query) = BlockQuery (CardanoBlock c) a
-> SomeSecond BlockQuery (CardanoBlock c)
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryAnytime a -> BlockQuery (CardanoBlock c) a
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeConway QueryAnytime a
query)
injHardFork :: Some (QueryHardFork (x : xs1))
-> SomeSecond BlockQuery (HardForkBlock (x : xs1))
injHardFork (Some QueryHardFork (x : xs1) a
query) = BlockQuery (HardForkBlock (x : xs1)) a
-> SomeSecond BlockQuery (HardForkBlock (x : xs1))
forall {k1} {k2} (f :: k1 -> k2 -> *) (a :: k1) (b :: k2).
f a b -> SomeSecond f a
SomeSecond (QueryHardFork (x : xs1) a -> BlockQuery (HardForkBlock (x : xs1)) a
forall (xs1 :: [*]) x a.
IsNonEmpty xs1 =>
QueryHardFork (x : xs1) a -> BlockQuery (HardForkBlock (x : xs1)) a
QueryHardFork QueryHardFork (x : xs1) a
query)
instance Arbitrary History.EraEnd where
arbitrary :: Gen EraEnd
arbitrary = [Gen EraEnd] -> Gen EraEnd
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[ Bound -> EraEnd
History.EraEnd (Bound -> EraEnd) -> Gen Bound -> Gen EraEnd
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Bound
forall a. Arbitrary a => Gen a
arbitrary
, EraEnd -> Gen EraEnd
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return EraEnd
History.EraUnbounded
]
instance Arbitrary History.SafeZone where
arbitrary :: Gen SafeZone
arbitrary = [Gen SafeZone] -> Gen SafeZone
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[ Word64 -> SafeZone
History.StandardSafeZone (Word64 -> SafeZone) -> Gen Word64 -> Gen SafeZone
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Word64
forall a. Arbitrary a => Gen a
arbitrary
, SafeZone -> Gen SafeZone
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return SafeZone
History.UnsafeIndefiniteSafeZone
]
instance Arbitrary History.EraParams where
arbitrary :: Gen EraParams
arbitrary = EpochSize -> SlotLength -> SafeZone -> GenesisWindow -> EraParams
History.EraParams
(EpochSize -> SlotLength -> SafeZone -> GenesisWindow -> EraParams)
-> Gen EpochSize
-> Gen (SlotLength -> SafeZone -> GenesisWindow -> EraParams)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (Word64 -> EpochSize
EpochSize (Word64 -> EpochSize) -> Gen Word64 -> Gen EpochSize
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Word64
forall a. Arbitrary a => Gen a
arbitrary)
Gen (SlotLength -> SafeZone -> GenesisWindow -> EraParams)
-> Gen SlotLength -> Gen (SafeZone -> GenesisWindow -> EraParams)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen SlotLength
forall a. Arbitrary a => Gen a
arbitrary
Gen (SafeZone -> GenesisWindow -> EraParams)
-> Gen SafeZone -> Gen (GenesisWindow -> EraParams)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen SafeZone
forall a. Arbitrary a => Gen a
arbitrary
Gen (GenesisWindow -> EraParams)
-> Gen GenesisWindow -> Gen EraParams
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (Word64 -> GenesisWindow
GenesisWindow (Word64 -> GenesisWindow) -> Gen Word64 -> Gen GenesisWindow
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Word64
forall a. Arbitrary a => Gen a
arbitrary)
instance Arbitrary History.EraSummary where
arbitrary :: Gen EraSummary
arbitrary = Bound -> EraEnd -> EraParams -> EraSummary
History.EraSummary
(Bound -> EraEnd -> EraParams -> EraSummary)
-> Gen Bound -> Gen (EraEnd -> EraParams -> EraSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen Bound
forall a. Arbitrary a => Gen a
arbitrary
Gen (EraEnd -> EraParams -> EraSummary)
-> Gen EraEnd -> Gen (EraParams -> EraSummary)
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen EraEnd
forall a. Arbitrary a => Gen a
arbitrary
Gen (EraParams -> EraSummary) -> Gen EraParams -> Gen EraSummary
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen EraParams
forall a. Arbitrary a => Gen a
arbitrary
instance (Arbitrary a, SListI xs) => Arbitrary (NonEmpty xs a) where
arbitrary :: Gen (NonEmpty xs a)
arbitrary = do
let nbXs :: Int
nbXs = Proxy xs -> Int
forall k (xs :: [k]) (proxy :: [k] -> *).
SListI xs =>
proxy xs -> Int
lengthSList (forall (t :: [*]). Proxy t
forall {k} (t :: k). Proxy t
Proxy @xs)
Int
len <- (Int, Int) -> Gen Int
forall a. Random a => (a, a) -> Gen a
choose (Int
1, Int
nbXs)
[a]
xs <- Int -> Gen a -> Gen [a]
forall a. Int -> Gen a -> Gen [a]
vectorOf Int
len Gen a
forall a. Arbitrary a => Gen a
arbitrary
NonEmpty xs a -> Gen (NonEmpty xs a)
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return (NonEmpty xs a -> Gen (NonEmpty xs a))
-> NonEmpty xs a -> Gen (NonEmpty xs a)
forall a b. (a -> b) -> a -> b
$ NonEmpty xs a -> Maybe (NonEmpty xs a) -> NonEmpty xs a
forall a. a -> Maybe a -> a
fromMaybe (String -> NonEmpty xs a
forall a. HasCallStack => String -> a
error String
"nonEmptyFromList failed") (Maybe (NonEmpty xs a) -> NonEmpty xs a)
-> Maybe (NonEmpty xs a) -> NonEmpty xs a
forall a b. (a -> b) -> a -> b
$ [a] -> Maybe (NonEmpty xs a)
forall (xs :: [*]) a. SListI xs => [a] -> Maybe (NonEmpty xs a)
nonEmptyFromList [a]
xs
instance Arbitrary (History.Interpreter (CardanoEras c)) where
arbitrary :: Gen (Interpreter (CardanoEras c))
arbitrary =
Summary (CardanoEras c) -> Interpreter (CardanoEras c)
forall (xs :: [*]). Summary xs -> Interpreter xs
History.mkInterpreter (Summary (CardanoEras c) -> Interpreter (CardanoEras c))
-> (NonEmpty (CardanoEras c) EraSummary -> Summary (CardanoEras c))
-> NonEmpty (CardanoEras c) EraSummary
-> Interpreter (CardanoEras c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty (CardanoEras c) EraSummary -> Summary (CardanoEras c)
forall (xs :: [*]). NonEmpty xs EraSummary -> Summary xs
History.Summary (NonEmpty (CardanoEras c) EraSummary -> Summary (CardanoEras c))
-> (NonEmpty (CardanoEras c) EraSummary
-> NonEmpty (CardanoEras c) EraSummary)
-> NonEmpty (CardanoEras c) EraSummary
-> Summary (CardanoEras c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty (CardanoEras c) EraSummary
-> NonEmpty (CardanoEras c) EraSummary
enforceInvariant (NonEmpty (CardanoEras c) EraSummary
-> Interpreter (CardanoEras c))
-> Gen (NonEmpty (CardanoEras c) EraSummary)
-> Gen (Interpreter (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (NonEmpty (CardanoEras c) EraSummary)
forall a. Arbitrary a => Gen a
arbitrary
where
enforceInvariant :: NonEmpty (CardanoEras c) EraSummary
-> NonEmpty (CardanoEras c) EraSummary
enforceInvariant NonEmpty (CardanoEras c) EraSummary
xs
| [EraSummary] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length (NonEmpty (CardanoEras c) EraSummary -> [EraSummary]
forall (xs :: [*]) a. NonEmpty xs a -> [a]
nonEmptyToList NonEmpty (CardanoEras c) EraSummary
xs) Int -> Int -> Bool
forall a. Eq a => a -> a -> Bool
== Proxy (CardanoEras c) -> Int
forall k (xs :: [k]) (proxy :: [k] -> *).
SListI xs =>
proxy xs -> Int
lengthSList (forall (t :: [*]). Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoEras c))
= NonEmpty (CardanoEras c) EraSummary
-> NonEmpty (CardanoEras c) EraSummary
forall (xs :: [*]).
NonEmpty xs EraSummary -> NonEmpty xs EraSummary
fixEndBound NonEmpty (CardanoEras c) EraSummary
xs
| Bool
otherwise
= NonEmpty (CardanoEras c) EraSummary
xs
fixEndBound ::
NonEmpty xs History.EraSummary
-> NonEmpty xs History.EraSummary
fixEndBound :: forall (xs :: [*]).
NonEmpty xs EraSummary -> NonEmpty xs EraSummary
fixEndBound (NonEmptyCons EraSummary
e NonEmpty xs1 EraSummary
es) = EraSummary
-> NonEmpty xs1 EraSummary -> NonEmpty (x : xs1) EraSummary
forall a (xs1 :: [*]) x.
a -> NonEmpty xs1 a -> NonEmpty (x : xs1) a
NonEmptyCons EraSummary
e (NonEmpty xs1 EraSummary -> NonEmpty xs1 EraSummary
forall (xs :: [*]).
NonEmpty xs EraSummary -> NonEmpty xs EraSummary
fixEndBound NonEmpty xs1 EraSummary
es)
fixEndBound (NonEmptyOne EraSummary
e) =
EraSummary -> NonEmpty (x : xs1) EraSummary
forall a x (xs1 :: [*]). a -> NonEmpty (x : xs1) a
NonEmptyOne EraSummary
e { History.eraEnd = History.EraUnbounded }
instance Arbitrary (EraIndex (CardanoEras c)) where
arbitrary :: Gen (EraIndex (CardanoEras c))
arbitrary = do
let nbEras :: Int
nbEras = Proxy (CardanoEras c) -> Int
forall k (xs :: [k]) (proxy :: [k] -> *).
SListI xs =>
proxy xs -> Int
lengthSList (forall (t :: [*]). Proxy t
forall {k} (t :: k). Proxy t
Proxy @(CardanoEras c))
Word8
index <- (Word8, Word8) -> Gen Word8
forall a. Random a => (a, a) -> Gen a
choose (Word8
0, Int -> Word8
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
nbEras Word8 -> Word8 -> Word8
forall a. Num a => a -> a -> a
- Word8
1)
case Word8 -> Maybe (NS (K ()) (CardanoEras c))
forall {k} (xs :: [k]). SListI xs => Word8 -> Maybe (NS (K ()) xs)
nsFromIndex Word8
index of
Maybe (NS (K ()) (CardanoEras c))
Nothing -> String -> Gen (EraIndex (CardanoEras c))
forall a. HasCallStack => String -> a
error (String -> Gen (EraIndex (CardanoEras c)))
-> String -> Gen (EraIndex (CardanoEras c))
forall a b. (a -> b) -> a -> b
$ String
"nsFromIndex failed for " String -> ShowS
forall a. Semigroup a => a -> a -> a
<> Word8 -> String
forall a. Show a => a -> String
show Word8
index
Just NS (K ()) (CardanoEras c)
ns -> EraIndex (CardanoEras c) -> Gen (EraIndex (CardanoEras c))
forall a. a -> Gen a
forall (m :: * -> *) a. Monad m => a -> m a
return (EraIndex (CardanoEras c) -> Gen (EraIndex (CardanoEras c)))
-> EraIndex (CardanoEras c) -> Gen (EraIndex (CardanoEras c))
forall a b. (a -> b) -> a -> b
$ NS (K ()) (CardanoEras c) -> EraIndex (CardanoEras c)
forall (xs :: [*]) (f :: * -> *).
SListI xs =>
NS f xs -> EraIndex xs
eraIndexFromNS NS (K ()) (CardanoEras c)
ns
instance c ~ MockCryptoCompatByron
=> Arbitrary (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))) where
arbitrary :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
arbitrary = [(Int,
Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))))]
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a. HasCallStack => [(Int, Gen a)] -> Gen a
frequency
[ (Int
1, (SomeResult ByronBlock -> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeResult (CardanoBlock c))
-> (SomeResult (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall byron shelley allegra mary alonzo babbage conway cardano c.
(Arbitrary (WithVersion ByronNodeToClientVersion byron),
Arbitrary (WithVersion ShelleyNodeToClientVersion shelley),
Arbitrary (WithVersion ShelleyNodeToClientVersion allegra),
Arbitrary (WithVersion ShelleyNodeToClientVersion mary),
Arbitrary (WithVersion ShelleyNodeToClientVersion alonzo),
Arbitrary (WithVersion ShelleyNodeToClientVersion babbage),
Arbitrary (WithVersion ShelleyNodeToClientVersion conway)) =>
(byron -> cardano)
-> (shelley -> cardano)
-> (allegra -> cardano)
-> (mary -> cardano)
-> (alonzo -> cardano)
-> (babbage -> cardano)
-> (conway -> cardano)
-> Gen
(WithVersion (HardForkNodeToClientVersion (CardanoEras c)) cardano)
arbitraryNodeToClient SomeResult ByronBlock -> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult ByronBlock -> SomeResult (CardanoBlock c)
injByron SomeResult (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeResult (CardanoBlock c)
injShelley SomeResult (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeResult (CardanoBlock c)
injAllegra SomeResult (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeResult (CardanoBlock c)
injMary SomeResult (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeResult (CardanoBlock c)
injAlonzo SomeResult (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeResult (CardanoBlock c)
injBabbage SomeResult (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeResult (CardanoBlock c)
forall {c}.
(PraosCrypto c, PraosCrypto c) =>
SomeResult (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeResult (CardanoBlock c)
injConway)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryIfCurrentResultEraMismatch)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultByron)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultShelley)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAllegra)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultMary)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAlonzo)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultBabbage)
, (Int
1, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultConway)
, (Int
1, Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
genQueryHardForkResult)
]
where
injByron :: SomeResult ByronBlock -> SomeResult (CardanoBlock c)
injByron (SomeResult BlockQuery ByronBlock result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery ByronBlock result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery ByronBlock result -> CardanoQuery c a
QueryIfCurrentByron BlockQuery ByronBlock result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injShelley :: SomeResult (ShelleyBlock (TPraos c) (ShelleyEra c))
-> SomeResult (CardanoBlock c)
injShelley (SomeResult BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
-> CardanoQuery c a
QueryIfCurrentShelley BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injAllegra :: SomeResult (ShelleyBlock (TPraos c) (AllegraEra c))
-> SomeResult (CardanoBlock c)
injAllegra (SomeResult BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
-> CardanoQuery c a
QueryIfCurrentAllegra BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injMary :: SomeResult (ShelleyBlock (TPraos c) (MaryEra c))
-> SomeResult (CardanoBlock c)
injMary (SomeResult BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
-> CardanoQuery c a
QueryIfCurrentMary BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injAlonzo :: SomeResult (ShelleyBlock (TPraos c) (AlonzoEra c))
-> SomeResult (CardanoBlock c)
injAlonzo (SomeResult BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
-> CardanoQuery c a
QueryIfCurrentAlonzo BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injBabbage :: SomeResult (ShelleyBlock (Praos c) (BabbageEra c))
-> SomeResult (CardanoBlock c)
injBabbage (SomeResult BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
-> CardanoQuery c a
QueryIfCurrentBabbage BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
injConway :: SomeResult (ShelleyBlock (Praos c) (ConwayEra c))
-> SomeResult (CardanoBlock c)
injConway (SomeResult BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
q result
r) = BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
-> CardanoQueryResult c result -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
-> BlockQuery (CardanoBlock c) (CardanoQueryResult c result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
-> CardanoQuery c a
QueryIfCurrentConway BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
q) (result -> CardanoQueryResult c result
forall result c. result -> CardanoQueryResult c result
QueryResultSuccess result
r)
genQueryIfCurrentResultEraMismatch :: Gen (SomeResult (CardanoBlock c))
genQueryIfCurrentResultEraMismatch :: Gen (SomeResult (CardanoBlock c))
genQueryIfCurrentResultEraMismatch = [Gen (SomeResult (CardanoBlock c))]
-> Gen (SomeResult (CardanoBlock c))
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[ (\(SomeResult BlockQuery ByronBlock result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery ByronBlock result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery ByronBlock result -> CardanoQuery c a
QueryIfCurrentByron BlockQuery ByronBlock result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult ByronBlock
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (SomeResult ByronBlock)
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (SomeResult ByronBlock)
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
-> CardanoQuery c a
QueryIfCurrentShelley BlockQuery (ShelleyBlock (TPraos c) (ShelleyEra c)) result
BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (ShelleyEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
-> CardanoQuery c a
QueryIfCurrentAllegra BlockQuery (ShelleyBlock (TPraos c) (AllegraEra c)) result
BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AllegraEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
-> CardanoQuery c a
QueryIfCurrentMary BlockQuery (ShelleyBlock (TPraos c) (MaryEra c)) result
BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (MaryEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
-> CardanoQuery c a
QueryIfCurrentAlonzo BlockQuery (ShelleyBlock (TPraos c) (AlonzoEra c)) result
BlockQuery
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(TPraos MockCryptoCompatByron) (AlonzoEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
-> CardanoQuery c a
QueryIfCurrentBabbage BlockQuery (ShelleyBlock (Praos c) (BabbageEra c)) result
BlockQuery
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (BabbageEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
, (\(SomeResult BlockQuery
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
result
q (result
_ :: result)) MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch ->
BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
-> Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result
-> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
-> BlockQuery
(CardanoBlock c)
(Either
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)) result)
forall c a result.
(CardanoQueryResult c result ~ a) =>
BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
-> CardanoQuery c a
QueryIfCurrentConway BlockQuery (ShelleyBlock (Praos c) (ConwayEra c)) result
BlockQuery
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
result
q) (forall a b. a -> Either a b
Left @_ @result MismatchEraInfo (CardanoEras MockCryptoCompatByron)
mismatch))
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron))
-> MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)))
-> Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen
(SomeResult
(ShelleyBlock
(Praos MockCryptoCompatByron) (ConwayEra MockCryptoCompatByron)))
forall a. Arbitrary a => Gen a
arbitrary Gen
(MismatchEraInfo (CardanoEras MockCryptoCompatByron)
-> SomeResult (CardanoBlock c))
-> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
-> Gen (SomeResult (CardanoBlock c))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Gen (MismatchEraInfo (CardanoEras MockCryptoCompatByron))
forall a. Arbitrary a => Gen a
arbitrary
]
genQueryAnytimeResultByron :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultByron :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultByron =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeByron QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultShelley :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultShelley :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultShelley =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeShelley QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultAllegra :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAllegra :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAllegra =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeAllegra QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultMary :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultMary :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultMary =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeMary QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultAlonzo :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAlonzo :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultAlonzo =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeAlonzo QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultBabbage :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultBabbage :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultBabbage =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeBabbage QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryAnytimeResultConway :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultConway :: Gen (SomeResult (CardanoBlock c))
genQueryAnytimeResultConway =
BlockQuery (CardanoBlock c) (Maybe Bound)
-> Maybe Bound -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryAnytime (Maybe Bound)
-> BlockQuery (CardanoBlock c) (Maybe Bound)
forall result c. QueryAnytime result -> CardanoQuery c result
QueryAnytimeConway QueryAnytime (Maybe Bound)
GetEraStart) (Maybe Bound -> SomeResult (CardanoBlock c))
-> Gen (Maybe Bound) -> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Maybe Bound)
forall a. Arbitrary a => Gen a
arbitrary
genQueryHardForkResult ::
Gen (WithVersion (HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
genQueryHardForkResult :: Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
genQueryHardForkResult = [Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))]
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a. HasCallStack => [Gen a] -> Gen a
oneof
[ HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall c.
CardanoHardForkConstraints c =>
(HardForkSpecificNodeToClientVersion -> Bool)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
genWithHardForkSpecificNodeToClientVersion
(HardForkSpecificNodeToClientVersion
-> HardForkSpecificNodeToClientVersion -> Bool
forall a. Ord a => a -> a -> Bool
>= HardForkSpecificNodeToClientVersion
HardForkSpecificNodeToClientVersion3)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (BlockQuery (CardanoBlock c) (Interpreter (CardanoEras c))
-> Interpreter (CardanoEras c) -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryHardFork (CardanoEras c) (Interpreter (CardanoEras c))
-> BlockQuery (CardanoBlock c) (Interpreter (CardanoEras c))
forall (xs1 :: [*]) x a.
IsNonEmpty xs1 =>
QueryHardFork (x : xs1) a -> BlockQuery (HardForkBlock (x : xs1)) a
QueryHardFork QueryHardFork (CardanoEras c) (Interpreter (CardanoEras c))
forall (xs :: [*]). QueryHardFork xs (Interpreter xs)
GetInterpreter) (Interpreter (CardanoEras c) -> SomeResult (CardanoBlock c))
-> Gen (Interpreter (CardanoEras c))
-> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (Interpreter (CardanoEras c))
forall a. Arbitrary a => Gen a
arbitrary)
, HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c))
forall v a. v -> a -> WithVersion v a
WithVersion
(HardForkNodeToClientVersion (CardanoEras c)
-> SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
-> Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
forall c.
HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c)
getHardForkEnabledNodeToClientVersion (HardForkEnabledNodeToClientVersion c
-> HardForkNodeToClientVersion (CardanoEras c))
-> Gen (HardForkEnabledNodeToClientVersion c)
-> Gen (HardForkNodeToClientVersion (CardanoEras c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (HardForkEnabledNodeToClientVersion c)
forall a. Arbitrary a => Gen a
arbitrary)
Gen
(SomeResult (CardanoBlock c)
-> WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
-> Gen (SomeResult (CardanoBlock c))
-> Gen
(WithVersion
(HardForkNodeToClientVersion (CardanoEras c))
(SomeResult (CardanoBlock c)))
forall a b. Gen (a -> b) -> Gen a -> Gen b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> (BlockQuery (CardanoBlock c) (EraIndex (CardanoEras c))
-> EraIndex (CardanoEras c) -> SomeResult (CardanoBlock c)
forall result blk.
(Eq result, Show result, Typeable result) =>
BlockQuery blk result -> result -> SomeResult blk
SomeResult (QueryHardFork (CardanoEras c) (EraIndex (CardanoEras c))
-> BlockQuery (CardanoBlock c) (EraIndex (CardanoEras c))
forall (xs1 :: [*]) x a.
IsNonEmpty xs1 =>
QueryHardFork (x : xs1) a -> BlockQuery (HardForkBlock (x : xs1)) a
QueryHardFork QueryHardFork (CardanoEras c) (EraIndex (CardanoEras c))
forall (xs :: [*]). QueryHardFork xs (EraIndex xs)
GetCurrentEra) (EraIndex (CardanoEras c) -> SomeResult (CardanoBlock c))
-> Gen (EraIndex (CardanoEras c))
-> Gen (SomeResult (CardanoBlock c))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Gen (EraIndex (CardanoEras c))
forall a. Arbitrary a => Gen a
arbitrary)
]