|
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
A Printable is either a String, a packed string, or a chunk of
text with both representations.
| Constructors | |
|
|
|
a Doc is a bit of enriched text. Docs get concatanated using
<>, which is right-associative.
| Constructors | | Instances | |
|
|
|
|
|
A set of printers to print different types of text to a handle.
| Constructors | |
|
|
|
|
|
|
|
|
hputDoc puts a doc on the given handle using simplePrinters
|
|
|
|
|
putDoc puts a doc on stdout using the simple printer simplePrinters.
|
|
|
putDocLn puts a doc, followed by a newline on stdout using
simplePrinters
|
|
|
hputDocWith puts a doc on the given handle using the given printer.
|
|
|
hputDocLnWith puts a doc, followed by a newline on the given
handle using the given printer.
|
|
|
putDocWith puts a doc on stdout using the given printer.
|
|
|
putDocLnWith puts a doc, followed by a newline on stdout using
the given printer.
|
|
|
renders a Doc into a String with control codes for the
special features of the doc.
|
|
|
renders a Doc into a String using a given set of printers.
|
|
|
renders a Doc into ByteString with control codes for the
special features of the Doc. See also readerString.
|
|
|
renders a doc into a ByteString using a given set of printers.
|
|
|
renders a Doc into a list of PackedStrings, one for each line.
|
|
|
renders a Doc into a list of PackedStrings, one for each
chunk of text that was added to the doc, using the given set of
printers.
|
|
|
|
|
|
|
colorText creates a Doc containing colored text from a String
|
|
|
invisibleText creates a Doc containing invisible text from a String
|
|
|
hiddenText creates a Doc containing hidden text from a String
|
|
|
|
|
userchunk creates a Doc containing a user chunk from a String
|
|
|
text creates a Doc from a String, using printable.
|
|
|
|
|
wrap_text n s is a Doc representing s line-wrapped at n characters
|
|
|
|
|
blueText creates a Doc containing blue text from a String
|
|
|
|
|
|
|
|
|
unsafeText creates a Doc from a String, using simplePrinter directly
|
|
|
unsafeBoth builds a Doc from a String and a ByteString representing
the same text, but does not check that they do.
|
|
|
unsafeBothText builds a Doc from a String. The string is stored in the
Doc as both a String and a ByteString.
|
|
|
unsafeChar creates a Doc containing just one character.
|
|
|
invisiblePS creates a Doc with invisible text from a ByteString
|
|
|
packedString builds a Doc from a ByteString using printable
|
|
|
unsafePackedString builds a Doc from a ByteString using simplePrinter
|
|
|
userchunkPS creates a Doc representing a user chunk from a ByteString.
|
|
|
simplePrinters is a Printers which uses the set 'simplePriners\'' on any
handle.
|
|
|
invisiblePrinter is the Printer for hidden text. It seems to
just replace the document with empty. I'm confused (Florent).
|
|
|
simplePrinter is the simplest Printer: it just concatenates together
the pieces of the Doc
|
|
|
|
|
The empty Doc.
|
|
|
'()' is the concatenation operator for Docs
|
|
|
a <?> b is a if it is not empty, else b.
|
|
|
a <+> b is a followed by a space, then b.
|
|
|
a $$ b is a above b.
|
|
|
vcat piles vertically a list of Docs.
|
|
|
vsep piles vertically a list of Docs leaving a blank line between each.
|
|
|
hcat concatenates (horizontally) a list of Docs
|
|
|
|
|
Minimal Docs representing the common characters space, newline
minus, plus, and backslash.
|
|
|
|
|
|
|
|
|
lparen is the Doc that represents "("
|
|
|
rparen is the Doc that represents ")"
|
|
|
parens doc returns a Doc with the content of doc put within
a pair of parenthesis.
|
|
|
|
Produced by Haddock version 2.4.2 |