-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Prettyprinter compatibility module for previous users of the annotated-wl-pprint package.
--   
--   See README.md
@package prettyprinter-compat-annotated-wl-pprint
@version 1


-- | <i>Deprecated: Compatibility module for users of annotated-wl-pprint -
--   use Data.Text.Prettyprint.Doc instead</i>
module Text.PrettyPrint.Annotated.Leijen

-- | The abstract data type <tt><a>Doc</a> ann</tt> represents pretty
--   documents that have been annotated with data of type <tt>ann</tt>.
--   
--   More specifically, a value of type <tt><a>Doc</a></tt> represents a
--   non-empty set of possible layouts of a document. The layout functions
--   select one of these possibilities, taking into account things like the
--   width of the output document.
--   
--   The annotation is an arbitrary piece of data associated with (part of)
--   a document. Annotations may be used by the rendering backends in order
--   to display output differently, such as
--   
--   <ul>
--   <li>color information (e.g. when rendering to the terminal)</li>
--   <li>mouseover text (e.g. when rendering to rich HTML)</li>
--   <li>whether to show something or not (to allow simple or detailed
--   versions)</li>
--   </ul>
--   
--   The simplest way to display a <a>Doc</a> is via the <a>Show</a> class.
--   
--   <pre>
--   &gt;&gt;&gt; putStrLn (show (vsep ["hello", "world"]))
--   hello
--   world
--   </pre>
data Doc ann :: * -> *
type SimpleDoc = SimpleDocStream
type SpanList a = [(Int, Int, a)]
putDoc :: Doc () -> IO ()
hPutDoc :: Handle -> Doc () -> IO ()
empty :: Doc ann
char :: Char -> Doc ann
text :: String -> Doc ann

-- | An associative operation.
--   
--   <pre>
--   (a <a>&lt;&gt;</a> b) <a>&lt;&gt;</a> c = a <a>&lt;&gt;</a> (b <a>&lt;&gt;</a> c)
--   </pre>
--   
--   If <tt>a</tt> is also a <a>Monoid</a> we further require
--   
--   <pre>
--   (<a>&lt;&gt;</a>) = <a>mappend</a>
--   </pre>
(<>) :: Semigroup a => a -> a -> a
infixr 6 <>

-- | <tt>(<a>nest</a> i x)</tt> lays out the document <tt>x</tt> with the
--   current indentation level increased by <tt>i</tt>. Negative values are
--   allowed, and decrease the nesting level accordingly.
--   
--   <pre>
--   &gt;&gt;&gt; vsep [nest 4 (vsep ["lorem", "ipsum", "dolor"]), "sit", "amet"]
--   lorem
--       ipsum
--       dolor
--   sit
--   amet
--   </pre>
--   
--   See also <a>hang</a>, <a>align</a> and <a>indent</a>.
nest :: () => Int -> Doc ann -> Doc ann

-- | The <tt><a>line</a></tt> document advances to the next line and
--   indents to the current nesting level.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "lorem ipsum" &lt;&gt; line &lt;&gt; "dolor sit amet"
--   
--   &gt;&gt;&gt; doc
--   lorem ipsum
--   dolor sit amet
--   </pre>
--   
--   <tt><a>line</a></tt> behaves like <tt><tt>space</tt></tt> if the line
--   break is undone by <a>group</a>:
--   
--   <pre>
--   &gt;&gt;&gt; group doc
--   lorem ipsum dolor sit amet
--   </pre>
line :: () => Doc ann
linebreak :: Doc ann

-- | <tt>(<a>group</a> x)</tt> tries laying out <tt>x</tt> into a single
--   line by removing the contained line breaks; if this does not fit the
--   page, <tt>x</tt> is laid out without any changes. The <a>group</a>
--   function is key to layouts that adapt to available space nicely.
--   
--   See <a>vcat</a>, <a>line</a>, or <a>flatAlt</a> for examples that are
--   related, or make good use of it.
group :: () => Doc ann -> Doc ann

-- | <tt>softline</tt> behaves like <tt><tt>space</tt></tt> if the
--   resulting output fits the page, otherwise like <tt><a>line</a></tt>.
--   
--   Here, we have enough space to put everything in one line:
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "lorem ipsum" &lt;&gt; softline &lt;&gt; "dolor sit amet"
--   
--   &gt;&gt;&gt; putDocW 80 doc
--   lorem ipsum dolor sit amet
--   </pre>
--   
--   If we narrow the page to width 10, the layouter produces a line break:
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 10 doc
--   lorem ipsum
--   dolor sit amet
--   </pre>
--   
--   <pre>
--   <a>softline</a> = <a>group</a> <a>line</a>
--   </pre>
softline :: () => Doc ann
softbreak :: Doc ann

-- | <tt>(<a>align</a> x)</tt> lays out the document <tt>x</tt> with the
--   nesting level set to the current column. It is used for example to
--   implement <a>hang</a>.
--   
--   As an example, we will put a document right above another one,
--   regardless of the current nesting level. Without <a>align</a>ment, the
--   second line is put simply below everything we've had so far,
--   
--   <pre>
--   &gt;&gt;&gt; "lorem" &lt;+&gt; vsep ["ipsum", "dolor"]
--   lorem ipsum
--   dolor
--   </pre>
--   
--   If we add an <a>align</a> to the mix, the <tt><a>vsep</a></tt>'s
--   contents all start in the same column,
--   
--   <pre>
--   &gt;&gt;&gt; "lorem" &lt;+&gt; align (vsep ["ipsum", "dolor"])
--   lorem ipsum
--         dolor
--   </pre>
align :: () => Doc ann -> Doc ann

-- | <tt>(<a>hang</a> i x)</tt> lays out the document <tt>x</tt> with a
--   nesting level set to the <i>current column</i> plus <tt>i</tt>.
--   Negative values are allowed, and decrease the nesting level
--   accordingly.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = reflow "Indenting these words with hang"
--   
--   &gt;&gt;&gt; putDocW 24 ("prefix" &lt;+&gt; hang 4 doc)
--   prefix Indenting these
--              words with
--              hang
--   </pre>
--   
--   This differs from <a>nest</a>, which is based on the <i>current
--   nesting level</i> plus <tt>i</tt>. When you're not sure, try the more
--   efficient <a>nest</a> first. In our example, this would yield
--   
--   <pre>
--   &gt;&gt;&gt; let doc = reflow "Indenting these words with nest"
--   
--   &gt;&gt;&gt; putDocW 24 ("prefix" &lt;+&gt; nest 4 doc)
--   prefix Indenting these
--       words with nest
--   </pre>
--   
--   <pre>
--   <a>hang</a> i doc = <a>align</a> (<a>nest</a> i doc)
--   </pre>
hang :: () => Int -> Doc ann -> Doc ann

-- | <tt>(<a>indent</a> i x)</tt> indents document <tt>x</tt> with
--   <tt>i</tt> spaces, starting from the current cursor position.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = reflow "The indent function indents these words!"
--   
--   &gt;&gt;&gt; putDocW 24 ("prefix" &lt;&gt; indent 4 doc)
--   prefix    The indent
--             function
--             indents these
--             words!
--   </pre>
--   
--   <pre>
--   <a>indent</a> i d = <a>hang</a> i ({i spaces} &lt;&gt; d)
--   </pre>
indent :: () => Int -> Doc ann -> Doc ann

-- | <tt>(<a>encloseSep</a> l r sep xs)</tt> concatenates the documents
--   <tt>xs</tt> separated by <tt>sep</tt>, and encloses the resulting
--   document by <tt>l</tt> and <tt>r</tt>.
--   
--   The documents are laid out horizontally if that fits the page,
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "list" &lt;+&gt; align (encloseSep lbracket rbracket comma (map pretty [1,20,300,4000]))
--   
--   &gt;&gt;&gt; putDocW 80 doc
--   list [1,20,300,4000]
--   </pre>
--   
--   If there is not enough space, then the input is split into lines
--   entry-wise therwise they are laid out vertically, with separators put
--   in the front:
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 10 doc
--   list [1
--        ,20
--        ,300
--        ,4000]
--   </pre>
--   
--   Note that <tt>doc</tt> contains an explicit call to <a>align</a> so
--   that the list items are aligned vertically.
--   
--   For putting separators at the end of entries instead, have a look at
--   <a>punctuate</a>.
encloseSep :: () => Doc ann -> Doc ann -> Doc ann -> [Doc ann] -> Doc ann

-- | Haskell-inspired variant of <a>encloseSep</a> with braces and comma as
--   separator.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = list (map pretty [1,20,300,4000])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 80 doc
--   [1, 20, 300, 4000]
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 10 doc
--   [ 1
--   , 20
--   , 300
--   , 4000 ]
--   </pre>
list :: () => [Doc ann] -> Doc ann

-- | Haskell-inspired variant of <a>encloseSep</a> with parentheses and
--   comma as separator.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = tupled (map pretty [1,20,300,4000])
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 80 doc
--   (1, 20, 300, 4000)
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 10 doc
--   ( 1
--   , 20
--   , 300
--   , 4000 )
--   </pre>
tupled :: () => [Doc ann] -> Doc ann
semiBraces :: [Doc ann] -> Doc ann

-- | <tt>(x <a>&lt;+&gt;</a> y)</tt> concatenates document <tt>x</tt> and
--   <tt>y</tt> with a <tt><tt>space</tt></tt> in between.
--   
--   <pre>
--   &gt;&gt;&gt; "hello" &lt;+&gt; "world"
--   hello world
--   </pre>
--   
--   <pre>
--   x <a>&lt;+&gt;</a> y = x <a>&lt;&gt;</a> <tt>space</tt> <a>&lt;&gt;</a> y
--   </pre>
(<+>) :: () => Doc ann -> Doc ann -> Doc ann
(<$>) :: Doc ann -> Doc ann -> Doc ann
(</>) :: Doc ann -> Doc ann -> Doc ann
(<$$>) :: Doc ann -> Doc ann -> Doc ann
(<//>) :: Doc ann -> Doc ann -> Doc ann

-- | <tt>(<a>hsep</a> xs)</tt> concatenates all documents <tt>xs</tt>
--   horizontally with <tt><a>&lt;+&gt;</a></tt>, i.e. it puts a space
--   between all entries.
--   
--   <pre>
--   &gt;&gt;&gt; let docs = Util.words "lorem ipsum dolor sit amet"
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; hsep docs
--   lorem ipsum dolor sit amet
--   </pre>
--   
--   <tt><a>hsep</a></tt> does not introduce line breaks on its own, even
--   when the page is too narrow:
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 5 (hsep docs)
--   lorem ipsum dolor sit amet
--   </pre>
--   
--   For automatic line breaks, consider using <a>fillSep</a> instead.
hsep :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>vsep</a> xs)</tt> concatenates all documents <tt>xs</tt> above
--   each other. If a <a>group</a> undoes the line breaks inserted by
--   <tt>vsep</tt>, the documents are separated with a <tt>space</tt>
--   instead.
--   
--   Using <a>vsep</a> alone yields
--   
--   <pre>
--   &gt;&gt;&gt; "prefix" &lt;+&gt; vsep ["text", "to", "lay", "out"]
--   prefix text
--   to
--   lay
--   out
--   </pre>
--   
--   <a>group</a>ing a <a>vsep</a> separates the documents with a
--   <tt>space</tt> if it fits the page (and does nothing otherwise). See
--   the <tt><a>sep</a></tt> convenience function for this use case.
--   
--   The <a>align</a> function can be used to align the documents under
--   their first element:
--   
--   <pre>
--   &gt;&gt;&gt; "prefix" &lt;+&gt; align (vsep ["text", "to", "lay", "out"])
--   prefix text
--          to
--          lay
--          out
--   </pre>
--   
--   Since <a>group</a>ing a <a>vsep</a> is rather common, <a>sep</a> is a
--   built-in for doing that.
vsep :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>fillSep</a> xs)</tt> concatenates the documents <tt>xs</tt>
--   horizontally with <tt><a>&lt;+&gt;</a></tt> as long as it fits the
--   page, then inserts a <tt><a>line</a></tt> and continues doing that for
--   all documents in <tt>xs</tt>. (<tt><a>line</a></tt> means that if
--   <a>group</a>ed, the documents are separated with a <tt>space</tt>
--   instead of newlines. Use <a>fillCat</a> if you do not want a
--   <tt>space</tt>.)
--   
--   Let's print some words to fill the line:
--   
--   <pre>
--   &gt;&gt;&gt; let docs = take 20 (cycle ["lorem", "ipsum", "dolor", "sit", "amet"])
--   
--   &gt;&gt;&gt; putDocW 80 ("Docs:" &lt;+&gt; fillSep docs)
--   Docs: lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor
--   sit amet lorem ipsum dolor sit amet
--   </pre>
--   
--   The same document, printed at a width of only 40, yields
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 40 ("Docs:" &lt;+&gt; fillSep docs)
--   Docs: lorem ipsum dolor sit amet lorem
--   ipsum dolor sit amet lorem ipsum dolor
--   sit amet lorem ipsum dolor sit amet
--   </pre>
fillSep :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>sep</a> xs)</tt> tries laying out the documents <tt>xs</tt>
--   separated with <tt>space</tt>s, and if this does not fit the page,
--   separates them with newlines. This is what differentiates it from
--   <a>vsep</a>, which always lays out its contents beneath each other.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "prefix" &lt;+&gt; sep ["text", "to", "lay", "out"]
--   
--   &gt;&gt;&gt; putDocW 80 doc
--   prefix text to lay out
--   </pre>
--   
--   With a narrower layout, the entries are separated by newlines:
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 20 doc
--   prefix text
--   to
--   lay
--   out
--   </pre>
--   
--   <pre>
--   <a>sep</a> = <a>group</a> . <a>vsep</a>
--   </pre>
sep :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>hcat</a> xs)</tt> concatenates all documents <tt>xs</tt>
--   horizontally with <tt><a>&lt;&gt;</a></tt> (i.e. without any spacing).
--   
--   It is provided only for consistency, since it is identical to
--   <a>mconcat</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let docs = Util.words "lorem ipsum dolor"
--   
--   &gt;&gt;&gt; hcat docs
--   loremipsumdolor
--   </pre>
hcat :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>vcat</a> xs)</tt> vertically concatenates the documents
--   <tt>xs</tt>. If it is <a>group</a>ed, the line breaks are removed.
--   
--   In other words <tt><a>vcat</a></tt> is like <tt><a>vsep</a></tt>, with
--   newlines removed instead of replaced by <tt>space</tt>s.
--   
--   <pre>
--   &gt;&gt;&gt; let docs = Util.words "lorem ipsum dolor"
--   
--   &gt;&gt;&gt; vcat docs
--   lorem
--   ipsum
--   dolor
--   
--   &gt;&gt;&gt; group (vcat docs)
--   loremipsumdolor
--   </pre>
--   
--   Since <a>group</a>ing a <a>vcat</a> is rather common, <a>cat</a> is a
--   built-in shortcut for it.
vcat :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>fillCat</a> xs)</tt> concatenates documents <tt>xs</tt>
--   horizontally with <tt><a>&lt;&gt;</a></tt> as long as it fits the
--   page, then inserts a <tt><a>line'</a></tt> and continues doing that
--   for all documents in <tt>xs</tt>. This is similar to how an ordinary
--   word processor lays out the text if you just keep typing after you hit
--   the maximum line length.
--   
--   (<tt><a>line'</a></tt> means that if <a>group</a>ed, the documents are
--   separated with nothing instead of newlines. See <a>fillSep</a> if you
--   want a <tt>space</tt> instead.)
--   
--   Observe the difference between <a>fillSep</a> and <a>fillCat</a>.
--   <a>fillSep</a> concatenates the entries <tt>space</tt>d when
--   <a>group</a>ed,
--   
--   <pre>
--   &gt;&gt;&gt; let docs = take 20 (cycle (["lorem", "ipsum", "dolor", "sit", "amet"]))
--   
--   &gt;&gt;&gt; putDocW 40 ("Grouped:" &lt;+&gt; group (fillSep docs))
--   Grouped: lorem ipsum dolor sit amet
--   lorem ipsum dolor sit amet lorem ipsum
--   dolor sit amet lorem ipsum dolor sit
--   amet
--   </pre>
--   
--   On the other hand, <a>fillCat</a> concatenates the entries directly
--   when <a>group</a>ed,
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 40 ("Grouped:" &lt;+&gt; group (fillCat docs))
--   Grouped: loremipsumdolorsitametlorem
--   ipsumdolorsitametloremipsumdolorsitamet
--   loremipsumdolorsitamet
--   </pre>
fillCat :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>cat</a> xs)</tt> tries laying out the documents <tt>xs</tt>
--   separated with nothing, and if this does not fit the page, separates
--   them with newlines. This is what differentiates it from <a>vcat</a>,
--   which always lays out its contents beneath each other.
--   
--   <pre>
--   &gt;&gt;&gt; let docs = Util.words "lorem ipsum dolor"
--   
--   &gt;&gt;&gt; putDocW 80 ("Docs:" &lt;+&gt; cat docs)
--   Docs: loremipsumdolor
--   </pre>
--   
--   When there is enough space, the documents are put above one another,
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 10 ("Docs:" &lt;+&gt; cat docs)
--   Docs: lorem
--   ipsum
--   dolor
--   </pre>
--   
--   <pre>
--   <a>cat</a> = <a>group</a> . <a>vcat</a>
--   </pre>
cat :: () => [Doc ann] -> Doc ann

-- | <tt>(<a>punctuate</a> p xs)</tt> appends <tt>p</tt> to all but the
--   last document in <tt>xs</tt>.
--   
--   <pre>
--   &gt;&gt;&gt; let docs = punctuate comma (Util.words "lorem ipsum dolor sit amet")
--   
--   &gt;&gt;&gt; putDocW 80 (hsep docs)
--   lorem, ipsum, dolor, sit, amet
--   </pre>
--   
--   The separators are put at the end of the entries, which we can see if
--   we position the result vertically:
--   
--   <pre>
--   &gt;&gt;&gt; putDocW 20 (vsep docs)
--   lorem,
--   ipsum,
--   dolor,
--   sit,
--   amet
--   </pre>
--   
--   If you want put the commas in front of their elements instead of at
--   the end, you should use <a>tupled</a> or, in general,
--   <a>encloseSep</a>.
punctuate :: () => Doc ann -> [Doc ann] -> [Doc ann]

-- | <tt>(<a>fill</a> i x)</tt> lays out the document <tt>x</tt>. It then
--   appends <tt>space</tt>s until the width is equal to <tt>i</tt>. If the
--   width of <tt>x</tt> is already larger, nothing is appended.
--   
--   This function is quite useful in practice to output a list of
--   bindings:
--   
--   <pre>
--   &gt;&gt;&gt; let types = [("empty","Doc"), ("nest","Int -&gt; Doc -&gt; Doc"), ("fillSep","[Doc] -&gt; Doc")]
--   
--   &gt;&gt;&gt; let ptype (name, tp) = fill 5 (pretty name) &lt;+&gt; "::" &lt;+&gt; pretty tp
--   
--   &gt;&gt;&gt; "let" &lt;+&gt; align (vcat (map ptype types))
--   let empty :: Doc
--       nest  :: Int -&gt; Doc -&gt; Doc
--       fillSep :: [Doc] -&gt; Doc
--   </pre>
fill :: () => Int -> Doc ann -> Doc ann

-- | <tt>(<a>fillBreak</a> i x)</tt> first lays out the document
--   <tt>x</tt>. It then appends <tt>space</tt>s until the width is equal
--   to <tt>i</tt>. If the width of <tt>x</tt> is already larger than
--   <tt>i</tt>, the nesting level is increased by <tt>i</tt> and a
--   <tt>line</tt> is appended. When we redefine <tt>ptype</tt> in the
--   example given in <a>fill</a> to use <tt><a>fillBreak</a></tt>, we get
--   a useful variation of the output:
--   
--   <pre>
--   &gt;&gt;&gt; let types = [("empty","Doc"), ("nest","Int -&gt; Doc -&gt; Doc"), ("fillSep","[Doc] -&gt; Doc")]
--   
--   &gt;&gt;&gt; let ptype (name, tp) = fillBreak 5 (pretty name) &lt;+&gt; "::" &lt;+&gt; pretty tp
--   
--   &gt;&gt;&gt; "let" &lt;+&gt; align (vcat (map ptype types))
--   let empty :: Doc
--       nest  :: Int -&gt; Doc -&gt; Doc
--       fillSep
--             :: [Doc] -&gt; Doc
--   </pre>
fillBreak :: () => Int -> Doc ann -> Doc ann

-- | <tt>(<a>enclose</a> l r x)</tt> encloses document <tt>x</tt> between
--   documents <tt>l</tt> and <tt>r</tt> using <tt><a>&lt;&gt;</a></tt>.
--   
--   <pre>
--   &gt;&gt;&gt; enclose "A" "Z" "·"
--   A·Z
--   </pre>
--   
--   <pre>
--   <a>enclose</a> l r x = l <a>&lt;&gt;</a> x <a>&lt;&gt;</a> r
--   </pre>
enclose :: () => Doc ann -> Doc ann -> Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; squotes "·"
--   '·'
--   </pre>
squotes :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; dquotes "·"
--   "·"
--   </pre>
dquotes :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; parens "·"
--   (·)
--   </pre>
parens :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; angles "·"
--   &lt;·&gt;
--   </pre>
angles :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; braces "·"
--   {·}
--   </pre>
braces :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; brackets "·"
--   [·]
--   </pre>
brackets :: () => Doc ann -> Doc ann

-- | <pre>
--   &gt;&gt;&gt; lparen
--   (
--   </pre>
lparen :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; rparen
--   )
--   </pre>
rparen :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; langle
--   &lt;
--   </pre>
langle :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; rangle
--   &gt;
--   </pre>
rangle :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; lbrace
--   {
--   </pre>
lbrace :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; rbrace
--   }
--   </pre>
rbrace :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; lbracket
--   [
--   </pre>
lbracket :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; rbracket
--   ]
--   </pre>
rbracket :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; squote
--   '
--   </pre>
squote :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; dquote
--   "
--   </pre>
dquote :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; semi
--   ;
--   </pre>
semi :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; colon
--   :
--   </pre>
colon :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; comma
--   ,
--   </pre>
comma :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; "a" &lt;&gt; space &lt;&gt; "b"
--   a b
--   </pre>
--   
--   This is mostly used via <tt><a>&lt;+&gt;</a></tt>,
--   
--   <pre>
--   &gt;&gt;&gt; "a" &lt;+&gt; "b"
--   a b
--   </pre>
space :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; dot
--   .
--   </pre>
dot :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; backslash
--   \
--   </pre>
backslash :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; equals
--   =
--   </pre>
equals :: () => Doc ann

-- | <pre>
--   &gt;&gt;&gt; pipe
--   |
--   </pre>
pipe :: () => Doc ann
string :: String -> Doc ann
int :: Int -> Doc ann
integer :: Integer -> Doc ann
float :: Float -> Doc ann
double :: Double -> Doc ann
rational :: Rational -> Doc ann
bool :: Bool -> Doc ann

-- | Add an annotation to a <tt><a>Doc</a></tt>. This annotation can then
--   be used by the renderer to e.g. add color to certain parts of the
--   output. For a full tutorial example on how to use it, see the
--   <a>Data.Text.Prettyprint.Doc.Render.Tutorials.StackMachineTutorial</a>
--   or
--   <a>Data.Text.Prettyprint.Doc.Render.Tutorials.TreeRenderingTutorial</a>
--   modules.
--   
--   This function is only relevant for custom formats with their own
--   annotations, and not relevant for basic prettyprinting. The predefined
--   renderers, e.g. <a>Data.Text.Prettyprint.Doc.Render.Text</a>, should
--   be enough for the most common needs.
annotate :: () => ann -> Doc ann -> Doc ann
noAnnotate :: Doc ann -> Doc xxx
renderPretty :: Float -> Int -> Doc ann -> SimpleDoc ann
renderCompact :: Doc ann -> SimpleDoc ann
displayDecorated :: (a -> String -> String) -> SimpleDoc a -> String
displayDecoratedA :: (Applicative f, Monoid b) => (String -> f b) -> (a -> f b) -> (a -> f b) -> SimpleDoc a -> f b
display :: SimpleDoc ann -> String
displayS :: SimpleDoc ann -> ShowS
displayIO :: Handle -> SimpleDoc a -> IO ()
displaySpans :: SimpleDoc a -> (String, SpanList a)

-- | Layout a document depending on which column it starts at. <a>align</a>
--   is implemented in terms of <a>column</a>.
--   
--   <pre>
--   &gt;&gt;&gt; column (\l -&gt; "Columns are" &lt;+&gt; pretty l &lt;&gt; "-based.")
--   Columns are 0-based.
--   </pre>
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "prefix" &lt;+&gt; column (\l -&gt; "| &lt;- column" &lt;+&gt; pretty l)
--   
--   &gt;&gt;&gt; vsep [indent n doc | n &lt;- [0,4,8]]
--   prefix | &lt;- column 7
--       prefix | &lt;- column 11
--           prefix | &lt;- column 15
--   </pre>
column :: () => (Int -> Doc ann) -> Doc ann

-- | Layout a document depending on the current <a>nest</a>ing level.
--   <a>align</a> is implemented in terms of <a>nesting</a>.
--   
--   <pre>
--   &gt;&gt;&gt; let doc = "prefix" &lt;+&gt; nesting (\l -&gt; brackets ("Nested:" &lt;+&gt; pretty l))
--   
--   &gt;&gt;&gt; vsep [indent n doc | n &lt;- [0,4,8]]
--   prefix [Nested: 0]
--       prefix [Nested: 4]
--           prefix [Nested: 8]
--   </pre>
nesting :: () => (Int -> Doc ann) -> Doc ann

-- | <tt>(<a>width</a> doc f)</tt> lays out the document <tt>doc</tt>, and
--   makes the column width of it available to a function.
--   
--   <pre>
--   &gt;&gt;&gt; let annotate doc = width (brackets doc) (\w -&gt; " &lt;- width:" &lt;+&gt; pretty w)
--   
--   &gt;&gt;&gt; align (vsep (map annotate ["---", "------", indent 3 "---", vsep ["---", indent 4 "---"]]))
--   [---] &lt;- width: 5
--   [------] &lt;- width: 8
--   [   ---] &lt;- width: 8
--   [---
--       ---] &lt;- width: 8
--   </pre>
width :: () => Doc ann -> (Int -> Doc ann) -> Doc ann
