Module
Ansi.Codes
- Package
- purescript-ansi
- Repository
- hdgarrood/purescript-ansi
This module defines a data type representing ANSI escape codes, as well as functions for serialising them as Strings.
#colorSuffix Source
colorSuffix :: String
The suffix for escape codes; note that this is only required for colors.
#EscapeCode Source
data EscapeCode
An ANSI escape code. Not all sequences are implemented. See: https://en.wikipedia.org/wiki/ANSI_escape_code.
Constructors
Up Int
Down Int
Forward Int
Back Int
NextLine Int
PreviousLine Int
HorizontalAbsolute Int
Position Int Int
EraseData EraseParam
EraseLine EraseParam
ScrollUp Int
ScrollDown Int
Graphics (NonEmptyList GraphicsParam)
SavePosition
RestorePosition
QueryPosition
HideCursor
ShowCursor
Instances
#escapeCodeToString Source
escapeCodeToString :: EscapeCode -> String
Convert an escape code to the form recognised by terminals.
#EraseParam Source
data EraseParam
Specifies how much text to erase.
- ToEnd: erase from the cursor to the end of the line or screen.
- FromBeginning: erase to the cursor from the beginning of the line or screen.
- Entire: erase the entire line or screen.
Constructors
Instances
#GraphicsParam Source
data GraphicsParam
A graphics parameter, controls how text appears; for example, bold, underlined, foreground color, background color.
Constructors
Instances
#RenderingMode Source
#Color Source
data Color
The standard set of 16 ANSI colors.
Constructors
Black
Red
Green
Yellow
Blue
Magenta
Cyan
White
BrightBlack
BrightRed
BrightGreen
BrightYellow
BrightBlue
BrightMagenta
BrightCyan
BrightWhite
Instances
- Modules
- Ansi.
Codes - Ansi.
Output