tip-lib-0.2.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

Pretty Int Source 
Pretty () Source 
Pretty Void Source 
Pretty a => Pretty [a] Source 
PrettyVar a => Pretty (PPVar a) Source 
(Pretty a, Pretty b) => Pretty (a, b) Source 
(Eq a, Pretty a, Pretty c) => Pretty (Rule c a) Source 
(Pretty a, Pretty c) => Pretty (Expr c a) Source 
(Pretty a, Pretty b, Pretty c) => Pretty (a, b, c) Source 

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

newtype PPVar a Source

Constructors

PPVar 

Fields

unPPVar :: a
 

Instances

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