Copyright | (c) Klaus Luettich C. Maeder Uni Bremen 2002-2005 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Rather than using (slow, sequential) strings create (fast, tree-like) documents and render them later as text for IO.
A very simplified version of John Hughes's and Simon Peyton Jones's Pretty Printer Combinators. Only catenable string sequences are left over.
The document type
The abstract type of documents
Primitive documents
Converting values into documents
Wrapping documents in delimiters
Combining documents
Rendering documents
fullRender :: (String -> a) -> (a -> a -> a) -> SDoc -> a Source #