iris-0.0.0.0: Haskell CLI framework
Copyright(c) 2020 Kowainik
(c) 2022 Dmitrii Kovanikov
LicenseMPL-2.0
MaintainerDmitrii Kovanikov <kovanikov@gmail.com>
StabilityExperimental
PortabilityPortable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Iris.Colour.Mode

Description

The ColourMode data type that allows disabling and enabling of colouring.

Since: 0.0.0.0

Synopsis

Documentation

data ColourMode Source #

Data type that tells whether the colouring is enabled or disabled. Its value is detected automatically on application start and stored in CliEnv.

Since: 0.0.0.0

Constructors

DisableColour

Since: 0.0.0.0

EnableColour

Since: 0.0.0.0

handleColourMode :: Handle -> IO ColourMode Source #

Returns ColourMode of a Handle. You can use this function on output Handles to find out whether they support colouring or not.

Use a function like this to check whether you can print with colour to terminal:

handleColourMode stdout

Since: 0.0.0.0