fourmolu-0.16.0.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageGHC2021

Ormolu.Terminal

Description

An abstraction for colorful output in terminal.

Synopsis

The Term abstraction

type Term = TermOutput () Source #

data ColorMode Source #

Whether to use colors and other features of ANSI terminals.

Constructors

Never 
Always 
Auto 

runTerm Source #

Arguments

:: Term 
-> ColorMode

Color mode

-> Handle

Handle to print to

-> IO () 

Run Term monad.

Styling

bold :: Term -> Term Source #

Make the output bold text.

cyan :: Term -> Term Source #

Make the output cyan text.

green :: Term -> Term Source #

Make the output green text.

red :: Term -> Term Source #

Make the output red text.

Printing

put :: Text -> Term Source #

Output Text.

putShow :: Show a => a -> Term Source #

Output a Show value.

putOutputable :: Outputable a => a -> Term Source #

Output an Outputable value.

newline :: Term Source #

Output a newline.