libcspm-0.2.1: A library providing a parser, type checker and evaluator for CSPM.

Util.PrettyPrint

Synopsis

Documentation

tabWidth :: IntSource

The width, in spaces, of a tab character.

tabIndent :: Doc -> DocSource

Indent a document by tabWidth characters, on each line (uses nest).

shortDouble :: Int -> Double -> DocSource

Show a double d printing only places places after the decimal place.

commaSeparatedInt :: Int -> DocSource

Pretty prints an integer and separates it into groups of 3, separated by commas.

angles :: Doc -> DocSource

Surrounds a Doc with < and >.

bars :: Doc -> DocSource

Surrounds a Doc with '|'.

list :: [Doc] -> DocSource

Separates a list of Docs by ','.

dotSep :: [Doc] -> DocSource

Separates a list of Docs by ..

speakNth :: Int -> DocSource

Converts a number into first, second etc.

punctuateFront :: Doc -> [Doc] -> [Doc]Source

Equivalent to [d1, sep d2, sep d3, ...].