HsColour
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Haskell.HsColour.ANSI

Description

Partially taken from Hugs AnsiScreen.hs library:

Synopsis

Documentation

highlightOff :: [Char] #

highlightG :: TerminalType -> [Highlight] -> String -> String #

Make the given string appear with all of the listed highlights

highlight :: [Highlight] -> String -> String #

cleareol :: [Char] #

clearbol :: [Char] #

clearline :: [Char] #

clearDown :: [Char] #

clearUp :: [Char] #

cls :: String #

Clear the screen.

goto :: Int -> Int -> String #

Move the screen cursor to the given position.

cursorUp :: [Char] #

cursorDown :: [Char] #

cursorLeft :: [Char] #

cursorRight :: [Char] #

savePosition :: [Char] #

restorePosition :: [Char] #

data Highlight #

Types of highlighting supported by ANSI codes (and some extra styles).

Instances

Instances details
Enum Highlight 
Instance details

Defined in Language.Haskell.HsColour.ANSI

Eq Highlight # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

(==) :: Highlight -> Highlight -> Bool

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

Read Highlight # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

readsPrec :: Int -> ReadS Highlight

readList :: ReadS [Highlight]

readPrec :: ReadPrec Highlight

readListPrec :: ReadPrec [Highlight]

Show Highlight # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

showsPrec :: Int -> Highlight -> ShowS

show :: Highlight -> String

showList :: [Highlight] -> ShowS

data Colour #

Colours supported by ANSI codes.

Constructors

Black 
Red 
Green 
Yellow 
Blue 
Magenta 
Cyan 
White 
Rgb Word8 Word8 Word8 

Instances

Instances details
Enum Colour # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Eq Colour # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

(==) :: Colour -> Colour -> Bool

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

Read Colour # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

readsPrec :: Int -> ReadS Colour

readList :: ReadS [Colour]

readPrec :: ReadPrec Colour

readListPrec :: ReadPrec [Colour]

Show Colour # 
Instance details

Defined in Language.Haskell.HsColour.ColourHighlight

Methods

showsPrec :: Int -> Colour -> ShowS

show :: Colour -> String

showList :: [Colour] -> ShowS

colourCycle :: [Colour] #

An infinite supply of colours.

enableScrollRegion :: Int -> Int -> String #

Scrolling

scrollUp :: String #

scrollDown :: String #

lineWrap :: Bool -> [Char] #

data TerminalType #

Constructors

Ansi16Colour

\033[Xm-style escape sequences (with X =~ [34][0-7])

XTerm256Compatible

Ansi16Colour, and also \033[Y8;5;Zm]-style escape sequences (with Y =~ [3,4] and Z an integer in [0,255] with the XTerm colour cube semantics).

Instances

Instances details
Eq TerminalType # 
Instance details

Defined in Language.Haskell.HsColour.Output

Methods

(==) :: TerminalType -> TerminalType -> Bool

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

Ord TerminalType # 
Instance details

Defined in Language.Haskell.HsColour.Output

Show TerminalType # 
Instance details

Defined in Language.Haskell.HsColour.Output

Methods

showsPrec :: Int -> TerminalType -> ShowS

show :: TerminalType -> String

showList :: [TerminalType] -> ShowS

Orphan instances