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

Iris.Colour.Formatting

Description

Helper functions to print with colouring.

Since: 0.0.0.0

Synopsis

Documentation

putStdoutColouredLn :: (MonadReader (CliEnv cmd appEnv) m, MonadIO m) => (ByteString -> ByteString) -> ByteString -> m () Source #

Print ByteString to stdout by providing a custom formatting function.

This works especially well with the colourista package:

putStdoutColouredLn
    (Colourista.formatWith [Colourista.bold, Colourista.green])
    "my message"

Since: 0.0.0.0

putStderrColouredLn :: (MonadReader (CliEnv cmd appEnv) m, MonadIO m) => (ByteString -> ByteString) -> ByteString -> m () Source #

Print ByteString to stderr by providing a custom formatting function.

This works especially well with the colourista package:

putStderrColouredLn
    (Colourista.formatWith [Colourista.bold, Colourista.green])
    "my message"

Since: 0.0.0.0