prednote-0.26.0.4: Evaluate and display trees of predicates

Safe HaskellSafe-Inferred
LanguageHaskell2010

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 :: Int Source

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 -> Text Source

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

rename :: Text -> Pred a -> Pred a Source

Create a new Pred with a different static label.

changeOutput Source

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.

speak Source

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 a Source

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