ansi-terminal-0.8.2: Simple ANSI terminal support, with Windows compatibility

Safe HaskellSafe
LanguageHaskell98

System.Console.ANSI.Types

Description

Types used to represent SELECT GRAPHIC RENDITION (SGR) aspects.

Synopsis

Documentation

data SGR Source #

ANSI Select Graphic Rendition command

Constructors

Reset 
SetConsoleIntensity !ConsoleIntensity 
SetItalicized !Bool

Not widely supported: sometimes treated as swapping foreground and background

SetUnderlining !Underlining 
SetBlinkSpeed !BlinkSpeed 
SetVisible !Bool

Not widely supported

SetSwapForegroundBackground !Bool 
SetColor !ConsoleLayer !ColorIntensity !Color 
SetRGBColor !ConsoleLayer !(Colour Float)

Supported from Windows 10 Creators Update

Instances
Eq SGR Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: SGR -> SGR -> Bool

(/=) :: SGR -> SGR -> Bool

Read SGR Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS SGR

readList :: ReadS [SGR]

readPrec :: ReadPrec SGR

readListPrec :: ReadPrec [SGR]

Show SGR Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> SGR -> ShowS

show :: SGR -> String

showList :: [SGR] -> ShowS

data ConsoleLayer Source #

ANSI colors can be set on two different layers

Constructors

Foreground 
Background 
Instances
Bounded ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: ConsoleLayer -> ConsoleLayer -> Bool

(/=) :: ConsoleLayer -> ConsoleLayer -> Bool

Ord ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Read ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS ConsoleLayer

readList :: ReadS [ConsoleLayer]

readPrec :: ReadPrec ConsoleLayer

readListPrec :: ReadPrec [ConsoleLayer]

Show ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> ConsoleLayer -> ShowS

show :: ConsoleLayer -> String

showList :: [ConsoleLayer] -> ShowS

Ix ConsoleLayer Source # 
Instance details

Defined in System.Console.ANSI.Types

data Color Source #

ANSI colors: come in various intensities, which are controlled by ColorIntensity

Constructors

Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 
Instances
Bounded Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: Color -> Color -> Bool

(/=) :: Color -> Color -> Bool

Ord Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

compare :: Color -> Color -> Ordering

(<) :: Color -> Color -> Bool

(<=) :: Color -> Color -> Bool

(>) :: Color -> Color -> Bool

(>=) :: Color -> Color -> Bool

max :: Color -> Color -> Color

min :: Color -> Color -> Color

Read Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS Color

readList :: ReadS [Color]

readPrec :: ReadPrec Color

readListPrec :: ReadPrec [Color]

Show Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> Color -> ShowS

show :: Color -> String

showList :: [Color] -> ShowS

Ix Color Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

range :: (Color, Color) -> [Color]

index :: (Color, Color) -> Color -> Int

unsafeIndex :: (Color, Color) -> Color -> Int

inRange :: (Color, Color) -> Color -> Bool

rangeSize :: (Color, Color) -> Int

unsafeRangeSize :: (Color, Color) -> Int

data ColorIntensity Source #

ANSI colors come in two intensities

Constructors

Dull 
Vivid 
Instances
Bounded ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Ord ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Read ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS ColorIntensity

readList :: ReadS [ColorIntensity]

readPrec :: ReadPrec ColorIntensity

readListPrec :: ReadPrec [ColorIntensity]

Show ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> ColorIntensity -> ShowS

show :: ColorIntensity -> String

showList :: [ColorIntensity] -> ShowS

Ix ColorIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

data ConsoleIntensity Source #

ANSI general console intensity: usually treated as setting the font style (e.g. BoldIntensity causes text to be bold)

Constructors

BoldIntensity 
FaintIntensity

Not widely supported: sometimes treated as concealing text

NormalIntensity 
Instances
Bounded ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Ord ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Read ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Show ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> ConsoleIntensity -> ShowS

show :: ConsoleIntensity -> String

showList :: [ConsoleIntensity] -> ShowS

Ix ConsoleIntensity Source # 
Instance details

Defined in System.Console.ANSI.Types

data Underlining Source #

ANSI text underlining

Constructors

SingleUnderline 
DoubleUnderline

Not widely supported

NoUnderline 
Instances
Bounded Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: Underlining -> Underlining -> Bool

(/=) :: Underlining -> Underlining -> Bool

Ord Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Read Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS Underlining

readList :: ReadS [Underlining]

readPrec :: ReadPrec Underlining

readListPrec :: ReadPrec [Underlining]

Show Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> Underlining -> ShowS

show :: Underlining -> String

showList :: [Underlining] -> ShowS

Ix Underlining Source # 
Instance details

Defined in System.Console.ANSI.Types

data BlinkSpeed Source #

ANSI blink speeds: values other than NoBlink are not widely supported

Constructors

SlowBlink

Less than 150 blinks per minute

RapidBlink

More than 150 blinks per minute

NoBlink 
Instances
Bounded BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Enum BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Eq BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

(==) :: BlinkSpeed -> BlinkSpeed -> Bool

(/=) :: BlinkSpeed -> BlinkSpeed -> Bool

Ord BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Read BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

readsPrec :: Int -> ReadS BlinkSpeed

readList :: ReadS [BlinkSpeed]

readPrec :: ReadPrec BlinkSpeed

readListPrec :: ReadPrec [BlinkSpeed]

Show BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types

Methods

showsPrec :: Int -> BlinkSpeed -> ShowS

show :: BlinkSpeed -> String

showList :: [BlinkSpeed] -> ShowS

Ix BlinkSpeed Source # 
Instance details

Defined in System.Console.ANSI.Types