Modulebasement-0.0.16Haskell2010
Basement.Terminal.ANSI
ANSI Terminal escape for cursor and attributes manipulations
On Unix system, it should be supported by most terminal emulators.
On Windows system, all escape sequences are empty for maximum compatibility purpose, and easy implementation. newer version of Windows 10 supports ANSI escape now, but we'll need some kind of detection.
Synopsis
- type Escape
- type Displacement
- type ColorComponent
- type GrayComponent
- type RGBComponent
- value cursorUp
- value cursorDown
- value cursorForward
- value cursorBack
- value cursorNextLine
- value cursorPrevLine
- value cursorHorizontalAbsolute
- value cursorPosition
- value eraseScreenFromCursor
- value eraseScreenToCursor
- value eraseScreenAll
- value eraseLineFromCursor
- value eraseLineToCursor
- value eraseLineAll
- value scrollUp
- value scrollDown
- value sgrReset
- value sgrForeground
- value sgrBackground
- value sgrForegroundGray24
- value sgrBackgroundGray24
- value sgrForegroundColor216
- value sgrBackgroundColor216
- Packagebasement-0.0.16
- Exports28
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceANSI.hs
Types
Simple color component on 8 color terminal (maximum compatibility)
Gray color compent on 256colors terminals
Color compent on 256colors terminals
Simple ANSI escape factory functions
All attribute off
8 Colors + Bold attribute for foreground
8 Colors + Bold attribute for background
value
sgrForegroundColor216 :: RGBComponentRed component
-> RGBComponentGreen component
-> RGBComponentBlue component
-> Escape
value
sgrBackgroundColor216 :: RGBComponentRed component
-> RGBComponentGreen component
-> RGBComponentBlue component
-> Escape