HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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.

Contents
  1. Colour
  2. Background
  3. Emphasis
  4. Reset
Synopsis
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

Background

Emphasis

valuebold :: IsString str => str

Code to apply bold 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

Reset

valuereset :: IsString str => str

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