The ansi-terminal package

[Tags: bsd3, library]

ANSI terminal support for Haskell: allows cursor movement, screen clearing, color output showing or hiding the cursor, and changing the title. Compatible with Windows and those Unixes with ANSI terminals, but only GHC is supported as a compiler.


[Skip to ReadMe]

Properties

Versions0.1, 0.2, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.5.1, 0.6, 0.6.1, 0.6.1.1, 0.6.2, 0.6.2.1, 0.6.2.2
Change logCHANGELOG.md
Dependenciesbase (<5), unix (>=2.3.0.0), Win32 (>=2.0) [details]
LicenseBSD3
AuthorMax Bolingbroke
MaintainerRoman Cheplyaka <roma@ro-che.info>
CategoryUser Interfaces
Home pagehttps://github.com/feuerbach/ansi-terminal
Source repositoryhead: git clone git://github.com/feuerbach/ansi-terminal.git
Executablesansi-terminal-example
UploadedMon Dec 16 12:55:29 UTC 2013 by RomanCheplyaka
DistributionsDebian:0.6.2.1, Fedora:0.6.2.1, FreeBSD:0.6.2.1, LTSHaskell:0.6.2.2, NixOS:0.6.2.2, Stackage:0.6.2.2
Downloads165089 total (1013 in last 30 days)
Votes
0 []
StatusDocs available [build log]
Successful builds reported [all 1 reports]

Modules

[Index]

Flags

NameDescriptionDefaultType
splitbaseChoose the new smaller, split-up base packageEnabledAutomatic
exampleBuild the example applicationDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for ansi-terminal-0.6.1

ansi-terminal

Haskell ANSI Terminal Package For Windows, OS X and Linux

Description

ANSI terminal support for Haskell, which allows:

It is compatible with Windows (via an emulation layer) and those Unixes with ANSI terminals.

If you like this, you may be interested in ansi-wl-pprint, which provides a pretty-printer that can construct strings containing ANSI colorisation.

Not all of the ANSI escape codes are provided by this module, but most (if not all) of the popular and well supported ones are. For a full list, have a look at the current version of the API. Each supported escape code or family of codes has a corresponding function that comes in three variants:

Example

A full example is available, but for a taste of how the library works try the following code:

import System.Console.ANSI

main = do
    setCursorPosition 5 0
    setTitle "ANSI Terminal Short Example"

    setSGR [ SetConsoleIntensity BoldIntensity
           , SetColor Foreground Vivid Red
           ]
    putStr "Hello"
    
    setSGR [ SetConsoleIntensity NormalIntensity
           , SetColor Foreground Vivid White
           , SetColor Background Dull Blue
           ]
    putStrLn "World!"

Documentation

Haddock documentation is available at Hackage.

Credits

The library is originally written by Max Bolingbroke