| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Agda.Utils.Pretty
Description
Pretty printing functions.
Pretty class
While Show is for rendering data in Haskell syntax,
Pretty is for displaying data to the world, i.e., the
user and the environment.
Atomic data has no inner document structure, so just
implement pretty as pretty a = text $ ... a ....
Instances
prettyList :: Pretty a => [a] -> Doc Source #
Space separated list of pretty things.
Pretty instances
Doc utilities
align :: Int -> [(String, Doc)] -> Doc Source #
align max rows lays out the elements of rows in two columns,
with the second components aligned. The alignment column of the
second components is at most max characters to the right of the
left-most column.
Precondition: max > 0.
multiLineText :: String -> Doc Source #
Handles strings with newlines properly (preserving indentation)
module Text.PrettyPrint