prednote-0.26.0.2

Safe HaskellSafe-Inferred

Prednote.Format

Description

Functions used to format text. Typically you won't need these unless you want tailored control over how your Pred are formatted.

Synopsis

Documentation

lblTrue :: [Chunk]Source

A colorful label for True values.

lblFalse :: [Chunk]Source

A colorful label for False values.

indentAmt :: IntSource

Indent amount.

lblLine :: Bool -> Text -> [Chunk]Source

Prefixes the given Text with colorful text to indicate True or False as appropriate.

indent :: [Chunk] -> Int -> [Chunk]Source

Indents the given list of Chunk by the given Int multipled by indentAmt. Appends a newline.

shortCir :: Int -> [Chunk]Source

A label for a short circuit.

indentTxt :: Text -> Int -> [Chunk]Source

Indents a Text by the given Int multiplied by indentAmt.

(<+>) :: Text -> Text -> TextSource

Append two Text, with an intervening space if both Text are not empty.

rename :: Text -> Pred a -> Pred aSource

Create a new Pred with a different static label.

changeOutputSource

Arguments

:: (a -> Output -> Output)

Function to modify the Output

-> Pred a

Modify the Output of this Pred

-> Pred a 

Creates a new Pred with a result differing from the original Pred.

speakSource

Arguments

:: (a -> Text)

New dynamic label. Do not indicate whether the result is True or False; this is done for you.

-> Pred a 
-> Pred a 

Creates a new Pred with a different dynamic label.

speakShort :: Pred a -> Pred aSource

Creates a new Pred with any short circuits having a colorful label.