pretty-terminal-0.1.0.0: Styling and coloring terminal output with ANSI escape sequences.
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Console.Pretty

Description

Useful helpers to style and color text with ANSI escape sequences.

Synopsis

Documentation

data Color Source #

Colors for an ANSI terminal

Instances

Instances details
Enum Color Source # 
Instance details

Defined in System.Console.Pretty

class Pretty a where Source #

A class to color and style

Minimal complete definition

colorize, style

Methods

color :: Color -> a -> a Source #

Helper to set foreground color

bgColor :: Color -> a -> a Source #

Helper to set background color

colorize :: Section -> Color -> a -> a Source #

Set the color of the (fg/bg) with the color

style :: Style -> a -> a Source #

Set the style

Instances

Instances details
Pretty Text Source #

Instance of Pretty for Text

Instance details

Defined in System.Console.Pretty

Pretty String Source #

Instance of Pretty for String

Instance details

Defined in System.Console.Pretty

data Section Source #

A section to be colored, either foreground or background.

Constructors

Foreground 
Background 

data Style Source #

SGR paramaters, aka text styles for an ANSI terminal

Instances

Instances details
Enum Style Source # 
Instance details

Defined in System.Console.Pretty

supportsPretty :: IO Bool Source #

Whether or not the current terminal supports pretty-terminal