Module

Ansi.Codes

This module defines a data type representing ANSI escape codes, as well as functions for serialising them as Strings.

#prefix

prefix :: String

The prefix for all escape codes.

#colorSuffix

colorSuffix :: String

The suffix for escape codes; note that this is only required for colors.

#escapeCodeToString

escapeCodeToString :: EscapeCode -> String

Convert an escape code to the form recognised by terminals.

#EraseParam

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

#eraseParamToString

#GraphicsParam

data GraphicsParam

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

Constructors

Instances

#graphicsParamToString

#codeForRenderingMode

#colorCode

Modules