| 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
- class Terse blk where
- tersePoint ∷ Point blk → String
- terseFragment ∷ AnchoredFragment blk → String
- terseHFragment ∷ AnchoredFragment (Header blk) → String
- terseHWTFragment ∷ AnchoredFragment (HeaderWithTime blk) → String
- terseBlock ∷ blk → String
- terseTip ∷ Tip blk → String
- terseHeader ∷ Header blk → String
- terseAnchor ∷ Terse blk ⇒ Anchor blk → String
- terseMaybe ∷ (a → String) → Maybe a → String
- terseRealPoint ∷ Terse blk ⇒ RealPoint blk → String
- terseWithOrigin ∷ (a → String) → WithOrigin a → String
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
| Terse TestBlock Source # | |
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 # | |
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.