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 AnsiBufferConstructors
AnsiBuffer { current :: List GraphicsParam, output :: String, pending :: Maybe (NonEmptyList GraphicsParam), previous :: List GraphicsParam }
#background Source
background :: Color -> Doc GraphicsParam -> Doc GraphicsParamPrints a document with a specific background color.
#bold Source
bold :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with bold styling.
#dim Source
dim :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with dim styling.
#foreground Source
foreground :: Color -> Doc GraphicsParam -> Doc GraphicsParamPrints a document with a specific foreground color.
#inverse Source
inverse :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with inverse styling.
#italic Source
italic :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with italic styling.
#reset Source
reset :: Doc GraphicsParam -> Doc GraphicsParamResets all cascading styles for a document so that outer styles won't interfere with inner styles.
#strikethrough Source
strikethrough :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with strikethrough styling.
#underline Source
underline :: Doc GraphicsParam -> Doc GraphicsParamPrints a document with underline styling.
Re-exports from Ansi.Codes
#GraphicsParam Source
data GraphicsParamA graphics parameter, controls how text appears; for example, bold, underlined, foreground color, background color.
Instances
#Color Source
data ColorThe standard set of 16 ANSI colors.
Constructors
BlackRedGreenYellowBlueMagentaCyanWhiteBrightBlackBrightRedBrightGreenBrightYellowBrightBlueBrightMagentaBrightCyanBrightWhite