ouroboros-consensus-test-0.1.0.0: Tests of the consensus layer
Safe HaskellNone
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
Eq a ⇒ Eq (Schedule a) Source # 
Instance details

Defined in Test.Util.Schedule

Methods

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

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

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

Defined in Test.Util.Schedule

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)