consensus-test
Safe HaskellSafe-Inferred
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 ∷ [Type] → Type where Source #

Constructors

ErasExactly (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 ∷ ∀ r. (∀ xs. (SListI xs, IsNonEmpty xs) ⇒ Eras xs → Gen r) → Gen r Source #

eraIndicesEras xs → NP (K Era) xs Source #

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

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

Era-specified generators

genEraParamsGen EraParams Source #

Generate era parameters

genShapeEras xs → Gen (Shape xs) Source #

genStartOfNextEraEpochNoEraParamsGen (Maybe EpochNo) Source #

Generate EpochNo for the start of the next era

genSummaryEras xs → Gen (Summary xs) Source #