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]


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.6, 0.6.1,, 0.6.2,,,
Dependenciesbase (==4.*), unix (>=, Win32 (>=2.0) [details]
AuthorMax Bolingbroke
MaintainerRoman Cheplyaka <>
CategoryUser Interfaces
Home page
Source repositoryhead: git clone git://
UploadedThu Sep 10 07:07:28 UTC 2015 by RomanCheplyaka
DistributionsDebian:, Fedora:, FreeBSD:, LTSHaskell:, NixOS:, Stackage:
Downloads165879 total (472 in last 30 days)
0 []
StatusDocs available [build log]
Last success reported on 2015-09-10 [all 1 reports]




exampleBuild the example applicationDisabledAutomatic

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


Maintainers' corner

For package maintainers and hackage trustees

Readme for ansi-terminal-


Haskell ANSI Terminal Package For Windows, OS X and Linux


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:


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!"


Haddock documentation is available at Hackage.


The library is originally written by Max Bolingbroke


Roman Cheplyaka is the primary maintainer.

Oliver Charles is the backup maintainer. Please get in touch with him if the primary maintainer cannot be reached.