rio-prettyprint-0.1.0.0: Pretty-printing for RIO
Safe HaskellNone
LanguageHaskell2010

Text.PrettyPrint.Leijen.Extended

Description

This module re-exports some of the interface for Text.PrettyPrint.Annotated.Leijen along with additional definitions useful for stack.

It defines a Monoid instance for Doc.

Synopsis

Pretty-print typeclass

class Pretty a where Source #

Minimal complete definition

Nothing

Methods

pretty :: a -> StyleDoc Source #

default pretty :: Show a => a -> StyleDoc Source #

Instances

Instances details
Pretty ModuleName Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: ModuleName -> StyleDoc Source #

Pretty StyleDoc Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty (Path b Dir) Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b Dir -> StyleDoc Source #

Pretty (Path b File) Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

pretty :: Path b File -> StyleDoc Source #

Ansi terminal Doc

data StyleDoc Source #

A document annotated by a style

Instances

Instances details
IsString StyleDoc Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

fromString :: String -> StyleDoc

Semigroup StyleDoc Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

(<>) :: StyleDoc -> StyleDoc -> StyleDoc

sconcat :: NonEmpty StyleDoc -> StyleDoc

stimes :: Integral b => b -> StyleDoc -> StyleDoc

Monoid StyleDoc Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Pretty StyleDoc Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

newtype StyleAnn Source #

A style annotation.

Constructors

StyleAnn (Maybe Style) 

Instances

Instances details
Eq StyleAnn Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

(==) :: StyleAnn -> StyleAnn -> Bool

(/=) :: StyleAnn -> StyleAnn -> Bool

Show StyleAnn Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

showsPrec :: Int -> StyleAnn -> ShowS

show :: StyleAnn -> String

showList :: [StyleAnn] -> ShowS

Semigroup StyleAnn Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

Methods

(<>) :: StyleAnn -> StyleAnn -> StyleAnn

sconcat :: NonEmpty StyleAnn -> StyleAnn

stimes :: Integral b => b -> StyleAnn -> StyleAnn

Monoid StyleAnn Source # 
Instance details

Defined in Text.PrettyPrint.Leijen.Extended

displayAnsi :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder Source #

displayPlain :: (Pretty a, HasLogFunc env, HasStylesUpdate env, MonadReader env m, HasCallStack) => Int -> a -> m Utf8Builder Source #

renderDefault :: Int -> Doc a -> SimpleDoc a Source #

Selective re-exports from Text.PrettyPrint.Annotated.Leijen

Documents, parametrized by their annotations

Basic combinators

Alignment

Operators

List combinators

Fillers

Bracketing combinators

Character documents

Primitive type documents

Semantic annotations

Rendering

Undocumented