Module

Dodo.Ansi

Package
purescript-dodo-printer
Repository
natefaubion/purescript-dodo-printer

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 Source

newtype AnsiBuffer

Constructors

#background Source

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

Prints a document with a specific background color.

#bold Source

bold :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with bold styling.

#dim Source

dim :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with dim styling.

#foreground Source

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

Prints a document with a specific foreground color.

#inverse Source

inverse :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with inverse styling.

#italic Source

italic :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with italic styling.

#reset Source

reset :: Doc GraphicsParam -> Doc GraphicsParam

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

#strikethrough Source

strikethrough :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with strikethrough styling.

#underline Source

underline :: Doc GraphicsParam -> Doc GraphicsParam

Prints a document with underline styling.

Re-exports from Ansi.Codes

#GraphicsParam Source

data GraphicsParam

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

Instances