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


-- | Wadler/Leijen pretty printer supporting colorful console output.
--   
--   Wadler/Leijen pretty printer with support for annotations and colorful
--   console output. Additional useful display routines are provided, e.g,
--   for HTML output.
@package wl-pprint-console
@version 0.1.0.1


-- | This is a pretty printer with support for annotations. The annotations
--   can be mapped to ANSI escape sequences to allow for colorful output on
--   consoles. For this purpose the console-style library is used.
module Text.PrettyPrint.Console.WL

-- | Display a rendered document which is annotated with pairs of strings
--   <tt>(String,String)</tt> and output a <a>Monoid</a>.
--   
--   The first element of the pair is prepended to the annotated region,
--   the second after the annotated region.
displayWrapped :: Monoid o => (String -> o) -> SimpleDoc (String, String) -> o

-- | Display a rendered document which is annotated with pairs of strings
--   <tt>(String,String)</tt> and output <a>Text</a>.
--   
--   The first element of the pair is prepended to the annotated region,
--   the second after the annotated region.
displayWrappedT :: SimpleDoc (String, String) -> Text

-- | Display a rendered document which is annotated with pairs of strings
--   <tt>(String,String)</tt> and output <tt>ByteString</tt>.
--   
--   The first element of the pair is prepended to the annotated region,
--   the second after the annotated region.
displayWrappedB :: SimpleDoc (String, String) -> ByteString

-- | Display a rendered document which is annotated with pairs of strings
--   <tt>(String,String)</tt> and output a <a>ShowS</a> function.
--   
--   The first element of the pair is prepended to the annotated region,
--   the second after the annotated region.
displayWrappedS :: SimpleDoc (String, String) -> ShowS

-- | Display a rendered document as HTML and output a <a>Monoid</a>.
--   
--   The annotated region is wrapped by <tt><a>class="f
--   a"</a>..<a>/span</a></tt> with the <tt>class</tt> attribute given by
--   the annotation function.
displayHTML :: Monoid o => (String -> o) -> (a -> String) -> SimpleDoc a -> o

-- | Display a rendered document as HTML and output <a>Text</a>.
--   
--   The annotated region is wrapped by <tt><a>class="f
--   a"</a>..<a>/span</a></tt> with the <tt>class</tt> attribute given by
--   the annotation function.
displayHTMLT :: (a -> String) -> SimpleDoc a -> Text

-- | Display a rendered document as HTML and output <tt>ByteString</tt>.
--   
--   The annotated region is wrapped by <tt><a>class="f
--   a"</a>..<a>/span</a></tt> with the <tt>class</tt> attribute given by
--   the annotation function.
displayHTMLB :: (a -> String) -> SimpleDoc a -> ByteString

-- | Display a rendered document as HTML and output a <a>ShowS</a>
--   function.
--   
--   The annotated region is wrapped by <tt><a>class="f
--   a"</a>..<a>/span</a></tt> with the <tt>class</tt> attribute given by
--   the annotation function.
displayHTMLS :: (a -> String) -> SimpleDoc a -> ShowS

-- | Display a rendered document with ANSI escape sequences and output
--   <a>Text</a>.
--   
--   The annotations are mapped to a '[Colored TL.Builder]' array.
displayColoredT :: (a -> [Colored Builder]) -> Term -> SimpleDoc a -> Text

-- | Display a rendered document with ANSI escape sequences and output
--   <tt>ByteString</tt>.
--   
--   The annotations are mapped to a '[Colored BL.Builder]' array.
displayColoredB :: (a -> [Colored Builder]) -> Term -> SimpleDoc a -> ByteString

-- | Display a rendered document with ANSI escape sequences and output a
--   <a>ShowS</a> function.
--   
--   The annotations are mapped to a '[Colored a]' array.
displayColoredS :: (a -> [Colored String]) -> Term -> SimpleDoc a -> ShowS

-- | Display a rendered document with ANSI escape sequences and output a
--   <a>Colored</a> array.
--   
--   The annotations are mapped to a <a>Colored</a> array.
displayColored :: (String -> o) -> (a -> [Colored o]) -> SimpleDoc a -> [Colored o]

-- | The action <tt>(hPutDocColored handle f doc)</tt> pretty prints
--   <tt>doc</tt> to file handle <tt>handle</tt> using the annotations.
--   
--   The annotations are mapped by <tt>f</tt> to <a>Colored</a> arrays.
hPutDocColored :: Handle -> Term -> (a -> [Colored String]) -> Doc a -> IO ()

-- | The action <tt>(putDocColored f doc)</tt> pretty prints <tt>doc</tt>
--   to <a>stdout</a> using the annotations.
--   
--   The annotations are mapped by <tt>f</tt> to <a>Colored</a> arrays.
putDocColored :: Term -> (a -> [Colored String]) -> Doc a -> IO ()

-- | <tt>(display simpleDoc)</tt> takes the output <tt>simpleDoc</tt> from
--   a rendering function and outputs a <tt>ByteString</tt>. Along the way,
--   all annotations are discarded.
displayB :: SimpleDoc a -> ByteString
