Module

Dodo.Ansi

This module provides functions printing with cascading ANSI styles. ANSI annotations closer to the root will cascade down to child nodes, where styles closer to the leaves take precedence. Indentation is never printed with ANSI styles, only the text elements of the document.

#AnsiBuffer

newtype AnsiBuffer

Constructors

#background

background :: Color -> Doc GraphicsParam -> Doc GraphicsParam

Prints a document with a specific background color.

#bold

bold :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with bold styling.

#dim

dim :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with dim styling.

#foreground

foreground :: Color -> Doc GraphicsParam -> Doc GraphicsParam

Prints a document with a specific foreground color.

#inverse

inverse :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with inverse styling.

#italic

italic :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with italic styling.

#reset

reset :: Doc GraphicsParam -> Doc GraphicsParam

Resets all cascading styles for a document so that outer styles won't interfere with inner styles.

#strikethrough

strikethrough :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with strikethrough styling.

#underline

underline :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with underline styling.

Re-exports from Ansi.Codes

#GraphicsParam

data GraphicsParam

A graphics parameter, controls how text appears; for example, bold, underlined, foreground color, background color.

Instances

Modules