HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecolourista-0.1.0.2Haskell2010

Colourista.Pure

SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik xrom.xkov@gmail.com

This module introduces helpful pure codes to customise the terminal output view.

  • 24 values
valueformatWith :: (IsString str, Semigroup str) => [str] -> str -> str
#

General purpose function to format strings with multiple options. If this function takes empty list as an argument, no formatting is applied.

Some typical usages include but not limited to:

  1. Green text: formatWith [green] myString

  2. Bold red text: formatWith [bold, red] myString

  3. Blue text on white background: formatWith [blue, whiteBg] myString

  4. Italicized yellow on cyan background: formatWith [italic, yellow, cyanBg] myString

Colored examples

⚠ Caution: Double underlining doubleUnderline is not widely supported. It is also not natively supported on Windows 10.

Colour

8 declarations
valuered :: IsString str => str
#

Code to apply Red colouring for the terminal output.

valueblue :: IsString str => str
#

Code to apply Blue colouring for the terminal output.

valuecyan :: IsString str => str
#

Code to apply Cyan colouring for the terminal output.

Background

8 declarations
valueredBg :: IsString str => str
#

Code to apply Red background colouring for the terminal output.

valuegreenBg :: IsString str => str
#

Code to apply Green background colouring for the terminal output.

valueblueBg :: IsString str => str
#

Code to apply Blue background colouring for the terminal output.

valueblackBg :: IsString str => str
#

Code to apply Black background colouring for the terminal output.

valuewhiteBg :: IsString str => str
#

Code to apply White background colouring for the terminal output.

valuecyanBg :: IsString str => str
#

Code to apply Cyan background colouring for the terminal output.

Emphasis

6 declarations
valuebold :: IsString str => str
#

Code to apply bold emphasis for the terminal output.

valueitalic :: IsString str => str
#

Code to apply italic emphasis for the terminal output.

valueunderline :: IsString str => str
#

Code to apply underline emphasis for the terminal output.

valuedoubleUnderline :: IsString str => str
#

Code to apply double underline emphasis for the terminal output.

⚠ Caution: This is not widely supported. It is not natively supported on Windows 10

valuenoUnderline :: IsString str => str
#

Code to apply no underline emphasis for the terminal output.

Reset

1 declaration
valuereset :: IsString str => str
#

Code to reset all previous code applied for the terminal output.