ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Util.TersePrinting

Description

Helpers for printing various objects in a terse way. Terse printing is similar to that provided by the Condense typeclass except it can be sometimes even more compact and it is very specific to tests.

Synopsis

Documentation

class Terse blk where Source #

Helpers for printing various objects in a terse way. Terse printing is similar to that provided by the Condense typeclass except it can be sometimes even more compact and it is very specific to tests.

Methods

tersePoint ∷ Point blk → String Source #

Same as terseBlock for points.

terseFragment ∷ AnchoredFragment blk → String Source #

Print a fragment of TestBlock in a terse way.

terseHFragment ∷ AnchoredFragment (Header blk) → String Source #

Same as terseFragment for fragments of headers.

terseHWTFragment ∷ AnchoredFragment (HeaderWithTime blk) → String Source #

Same as terseFragment for fragments of headers with time.

terseBlock ∷ blk → String Source #

terseTip ∷ Tip blk → String Source #

Same as tersePoint for tips.

terseHeader ∷ Header blk → String Source #

Same as terseBlock for headers.

Instances

Instances details
Terse TestBlock Source # 
Instance details

Defined in Test.Util.TersePrinting

Methods

tersePoint ∷ Point TestBlock → String Source #

terseFragment ∷ AnchoredFragment TestBlock → String Source #

terseHFragment ∷ AnchoredFragment (Header TestBlock) → String Source #

terseHWTFragment ∷ AnchoredFragment (HeaderWithTime TestBlock) → String Source #

terseBlock ∷ TestBlock → String Source #

terseTip ∷ Tip TestBlock → String Source #

terseHeader ∷ Header TestBlock → String Source #

terseAnchor ∷ Terse blk ⇒ Anchor blk → String Source #

Same as tersePoint for anchors.

terseMaybe ∷ (a → String) → Maybe a → String Source #

Same as terseWithOrigin for Maybe.

terseWithOrigin ∷ (a → String) → WithOrigin a → String Source #

Given a printer for elements of type a, prints a WithOrigin a in a terse way. Origin shows as G.