ouroboros-consensus:unstable-consensus-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Util.Serialisation.Examples

Synopsis

Examples

data Examples blk Source #

Instances

Instances details
Monoid (Examples blk) Source # 
Instance details

Defined in Test.Util.Serialisation.Examples

Methods

mempty ∷ Examples blk #

mappend ∷ Examples blk → Examples blk → Examples blk #

mconcat ∷ [Examples blk] → Examples blk #

Semigroup (Examples blk) Source # 
Instance details

Defined in Test.Util.Serialisation.Examples

Methods

(<>) ∷ Examples blk → Examples blk → Examples blk #

sconcat ∷ NonEmpty (Examples blk) → Examples blk #

stimes ∷ Integral b ⇒ b → Examples blk → Examples blk #

Operations on examples

combineExamples ∷ (∀ a. Labelled a → Labelled a → Labelled a) → Examples blk → Examples blk → Examples blk Source #

mapExamples ∷ (∀ a. Labelled a → Labelled a) → Examples blk → Examples blk Source #

prefixExamples ∷ String → Examples blk → Examples blk Source #

Add the given prefix to each labelled example.

When a label is empty, the prefix is used as the label. If the label is not empty, the prefix and _ are prepended.

Labelling

type Labelled a = [(Maybe String, a)] Source #

labelled ∷ [(String, a)] → Labelled a Source #

Top-level queries

topLevelQueries ∷ Labelled (SomeSecond Query blk) Source #

The non-BlockQuery constructors of Query.

They are the same for every block, so every block can use this list as its exampleTopLevelQuery. DebugLedgerConfig is left out on purpose: it is a debug query, and we make no effort to keep its encoding stable.