ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Util.Schedule

Description

Utilities to schedule actions per Tick.

Synopsis

Documentation

newtype Schedule a Source #

A schedule plans actions on certain times.

TODO Note that a schedule can't express delays between the actions within a single tick. Generating such delays may expose more (most likely concurrency-related) bugs.

Constructors

Schedule 

Fields

Instances

Instances details
Show a ⇒ Show (Schedule a) Source # 
Instance details

Defined in Test.Util.Schedule

Methods

showsPrecIntSchedule a → ShowS #

showSchedule a → String #

showList ∷ [Schedule a] → ShowS #

Eq a ⇒ Eq (Schedule a) Source # 
Instance details

Defined in Test.Util.Schedule

Methods

(==)Schedule a → Schedule a → Bool #

(/=)Schedule a → Schedule a → Bool #

Condense a ⇒ Condense (Schedule a) Source # 
Instance details

Defined in Test.Util.Schedule

Methods

condenseSchedule a → String Source #

genSchedule ∷ [a] → Gen (Schedule a) Source #

Spread out elements over a schedule, i.e. schedule a number of elements to be processed on each tick. Most ticks will have no associated elements.

joinScheduleSchedule a → [a] Source #

Inverse of genSchedule

lastTickSchedule a → Tick Source #

Return the last tick at which an update is planned, if no updates are planned, return 0.

shrinkScheduleSchedule a → [Schedule a] Source #

Repeatedly remove the last entry (highest Tick)