consensus-test
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.HardFork.Infra

Description

Infrastructure shared by the various HardFork tests

Synopsis

Generate HardFork shape

data Era Source #

Constructors

Era 

Fields

Instances

Instances details
Show Era Source # 
Instance details

Defined in Test.Consensus.HardFork.Infra

Methods

showsPrecIntEraShowS #

showEraString #

showList ∷ [Era] → ShowS #

Eq Era Source # 
Instance details

Defined in Test.Consensus.HardFork.Infra

Methods

(==)EraEraBool #

(/=)EraEraBool #

Ord Era Source # 
Instance details

Defined in Test.Consensus.HardFork.Infra

Methods

compareEraEraOrdering #

(<)EraEraBool #

(<=)EraEraBool #

(>)EraEraBool #

(>=)EraEraBool #

maxEraEraEra #

minEraEraEra #

data Eras (a ∷ [Type]) where Source #

Constructors

Eras ∷ ∀ x (xs ∷ [Type]). Exactly (x ': xs) EraEras (x ': xs) 

Instances

Instances details
Show (Eras xs) Source # 
Instance details

Defined in Test.Consensus.HardFork.Infra

Methods

showsPrecIntEras xs → ShowS #

showEras xs → String #

showList ∷ [Eras xs] → ShowS #

chooseEras ∷ (∀ (xs ∷ [Type]). (SListI xs, IsNonEmpty xs) ⇒ Eras xs → Gen r) → Gen r Source #

eraIndices ∷ ∀ (xs ∷ [Type]). Eras xs → NP (K EraTypeType) xs Source #

erasMapStateM ∷ ∀ m s a (xs ∷ [Type]). Monad m ⇒ (Era → s → m (a, s)) → Eras xs → s → m (Exactly xs a) Source #

erasUnfoldAtMost ∷ ∀ m (xs ∷ [Type]) a. Monad m ⇒ (EraBound → m (a, EraEnd)) → Eras xs → Bound → m (NonEmpty xs a) Source #

Era-specified generators

genEraParamsGen EraParams Source #

Generate era parameters

genShape ∷ ∀ (xs ∷ [Type]). Eras xs → Gen (Shape xs) Source #

genStartOfNextEraEpochNoEraParamsGen (Maybe EpochNo) Source #

Generate EpochNo for the start of the next era

genSummary ∷ ∀ (xs ∷ [Type]). Eras xs → Gen (Summary xs) Source #