ormolu-0.7.7.0: A formatter for Haskell source code
Safe HaskellNone
LanguageGHC2021

Ormolu.Terminal

Description

An abstraction for colorful output in terminal.

Synopsis

The Term abstraction

type Term = TermOutput () #

data ColorMode #

Whether to use colors and other features of ANSI terminals.

Constructors

Never 
Always 
Auto 

Instances

Instances details
Show ColorMode # 
Instance details

Defined in Ormolu.Terminal

Eq ColorMode # 
Instance details

Defined in Ormolu.Terminal

runTerm #

Arguments

:: Term 
-> ColorMode

Color mode

-> Handle

Handle to print to

-> IO () 

Run Term monad.

Styling

bold :: Term -> Term #

Make the output bold text.

cyan :: Term -> Term #

Make the output cyan text.

green :: Term -> Term #

Make the output green text.

red :: Term -> Term #

Make the output red text.

Printing

put :: Text -> Term #

Output Text.

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

Output a Show value.

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

Output an Outputable value.

newline :: Term #

Output a newline.