Ormolu.Terminal
Contents
Term
Description
An abstraction for colorful output in terminal.
data Term a Source #
Terminal monad.
Defined in Ormolu.Terminal
Methods
(>>=) :: Term a -> (a -> Term b) -> Term b #
(>>) :: Term a -> Term b -> Term b #
return :: a -> Term a #
fmap :: (a -> b) -> Term a -> Term b #
(<$) :: a -> Term b -> Term a #
pure :: a -> Term a #
(<*>) :: Term (a -> b) -> Term a -> Term b #
liftA2 :: (a -> b -> c) -> Term a -> Term b -> Term c #
(*>) :: Term a -> Term b -> Term b #
(<*) :: Term a -> Term b -> Term a #
data ColorMode Source #
Whether to use colors and other features of ANSI terminals.
Constructors
(==) :: ColorMode -> ColorMode -> Bool #
(/=) :: ColorMode -> ColorMode -> Bool #
showsPrec :: Int -> ColorMode -> ShowS #
show :: ColorMode -> String #
showList :: [ColorMode] -> ShowS #
runTerm Source #
Arguments
Monad to run
Color mode
Handle to print to
Run Term monad.
bold :: Term a -> Term a Source #
Make the inner computation output bold text.
cyan :: Term a -> Term a Source #
Make the inner computation output cyan text.
green :: Term a -> Term a Source #
Make the inner computation output green text.
red :: Term a -> Term a Source #
Make the inner computation output red text.
put :: Text -> Term () Source #
Output Text.
Text
putS :: String -> Term () Source #
Output String.
String
putSrcSpan :: SrcSpan -> Term () Source #
Output a SrcSpan.
SrcSpan
newline :: Term () Source #
Output a newline.