tip-lib-0.1.2: tons of inductive problems - support library and tools

Safe HaskellNone
LanguageHaskell2010

Tip.Pretty

Contents

Synopsis

Documentation

class Pretty a where Source

Typeclass for pretty things

Methods

pp :: a -> Doc Source

Instances

ppRender :: Pretty a => a -> String Source

Pretty to string

pprint :: Pretty a => a -> IO () Source

Print something pretty

class PrettyVar a where Source

Typeclass for variables

Methods

varStr :: a -> String Source

The string in a variable

ppVar :: PrettyVar a => a -> Doc Source

Variable to Doc

Utilities on Docs

($\) :: Doc -> Doc -> Doc infixl 1 Source

Infix hang

parIf :: Bool -> Doc -> Doc Source

Conditional parentheses