language-python-0.5.0: Parsing and pretty printing of Python code.

Copyright(c) 2009 Bernie Pope
LicenseBSD-style
Maintainerbjpop@csse.unimelb.edu.au
Stabilityexperimental
Portabilityghc
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Python.Common.Pretty

Description

Convenience class for pretty printing combinators.

Synopsis

Documentation

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

Transform values into strings.

prettyPrefix :: Pretty a => Int -> a -> Doc Source

Print just the prefix of something

parensIf :: Pretty a => (a -> Bool) -> a -> Doc Source

Conditionally wrap parentheses around an item.

perhaps :: Pretty a => Maybe a -> Doc -> Doc Source

commaList :: Pretty a => [a] -> Doc Source

A list of things separated by commas.