Safe Haskell | None |
---|---|
Language | Haskell2010 |
Monadic front-end to Text.PrettyPrint
An empty document
A ';' character
A ',' character
A :
character
A space character
A '=' character
A "->" string
A '(' character
A ')' character
A '[' character
A ']' character
A '{' character
A '}' character
integer :: Integer -> Doc Source
double :: Double -> Doc Source
rational :: Rational -> Doc Source
Wrap document in (...)
Wrap document in [...]
Wrap document in {...}
Wrap document in '...'
doubleQuotes :: Doc -> Doc Source
Wrap document in "..."
(<>) :: Doc -> Doc -> Doc infixl 6 Source
Beside
(<+>) :: Doc -> Doc -> Doc infixl 6 Source
Beside, separated by space
List version of <>
List version of <+>
($$) :: Doc -> Doc -> Doc infixl 5 Source
Above; if there is no overlap it "dovetails" the two
($+$) :: Doc -> Doc -> Doc infixl 5 Source
Above, without dovetailing.
List version of $$
Either hsep or vcat
Either hcat or vcat
"Paragraph fill" version of sep
"Paragraph fill" version of cat
nest :: Int -> Doc -> Doc Source
Nested
hang :: Doc -> Int -> Doc -> Doc Source
hang d1 n d2 = sep [d1, nest n d2]
punctuate :: Doc -> [Doc] -> [Doc] Source
punctuate p [d1, ... dn] = [d1 <> p, d2 <> p, ... dn-1 <> p, dn]
isEmpty :: Doc -> PprM Bool Source
Returns True
if the document is empty
to_HPJ_Doc :: Doc -> Doc Source
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/7.10.3/docs/html/libraries/template-haskell-2.10.0.0/Language-Haskell-TH-PprLib.html