| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
- terseAnchor ∷ Anchor TestBlock → String
- terseBlock ∷ TestBlock → String
- terseFragment ∷ AnchoredFragment TestBlock → String
- terseHFragment ∷ AnchoredFragment (Header TestBlock) → String
- terseHWTFragment ∷ AnchoredFragment (HeaderWithTime TestBlock) → String
- terseHeader ∷ Header TestBlock → String
- terseMaybe ∷ (a → String) → Maybe a → String
- tersePoint ∷ Point TestBlock → String
- terseRealPoint ∷ RealPoint TestBlock → String
- terseTip ∷ Tip TestBlock → String
- terseWithOrigin ∷ (a → String) → WithOrigin a → String
Documentation
terseAnchor ∷ Anchor TestBlock → String Source #
Same as tersePoint for anchors.
terseBlock ∷ TestBlock → String Source #
Print a TestBlock as block-slot[hash]. hash only shows if there is a
non-zero element in it. When it shows, it shows in a compact form. For
instance, the hash [0,0,1,0,0,0] shows as [2x0,1,3x0].
terseFragment ∷ AnchoredFragment TestBlock → String Source #
Print a fragment of TestBlock in a terse way. This shows as anchor |
block ... where anchor is printed with terseAnchor and blocks are
printed with terseBlock'; in particular, only the last element of the hash
shows and only when it is non-zero.
terseHFragment ∷ AnchoredFragment (Header TestBlock) → String Source #
Same as terseFragment for fragments of headers.
terseHWTFragment ∷ AnchoredFragment (HeaderWithTime TestBlock) → String Source #
Same as terseFragment for fragments of headers with time.
terseHeader ∷ Header TestBlock → String Source #
Same as terseBlock for headers.
terseMaybe ∷ (a → String) → Maybe a → String Source #
Same as terseWithOrigin for Maybe.
tersePoint ∷ Point TestBlock → String Source #
Same as terseBlock for points. Genesis shows as G.
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.