-- 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.0.1.2 -- | 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 -- (String,String) and output a Monoid. -- -- 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 -- (String,String) and output Text. -- -- 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 -- (String,String) and output a ShowS 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 Monoid. -- -- The annotated region is wrapped by class="f -- a"../span with the class attribute given by -- the annotation function. displayHTML :: Monoid o => (String -> o) -> (a -> String) -> SimpleDoc a -> o -- | Display a rendered document as HTML and output Text. -- -- The annotated region is wrapped by class="f -- a"../span with the class attribute given by -- the annotation function. displayHTMLT :: (a -> String) -> SimpleDoc a -> Text -- | Display a rendered document as HTML and output a ShowS -- function. -- -- The annotated region is wrapped by class="f -- a"../span with the class attribute given by -- the annotation function. displayHTMLS :: (a -> String) -> SimpleDoc a -> ShowS -- | Display a rendered document with ANSI escape sequences and output a -- Monoid. -- -- The annotations are mapped to a [SetStyle] array. displayStyleCode :: Monoid o => (String -> o) -> (a -> [SetStyle]) -> Term -> SimpleDoc a -> o -- | Display a rendered document with ANSI escape sequences and output -- Text. -- -- The annotations are mapped to a '[SetStyle]' array. displayStyleCodeT :: (a -> [SetStyle]) -> Term -> SimpleDoc a -> Text -- | Display a rendered document with ANSI escape sequences and output a -- ShowS function. -- -- The annotations are mapped to a '[SetStyle]' array. displayStyleCodeS :: (a -> [SetStyle]) -> Term -> SimpleDoc a -> ShowS -- | Display a rendered document with ANSI escape sequences to a given -- Handle. -- -- The annotations are mapped to a '[SetStyle]' array. hDisplayStyle :: MonadIO m => Handle -> (a -> [SetStyle]) -> SimpleDoc a -> m () -- | Display a rendered document with ANSI escape sequences to -- stdout. -- -- The annotations are mapped to a '[SetStyle]' array. displayStyle :: MonadIO m => (a -> [SetStyle]) -> SimpleDoc a -> m () -- | The action (hPutDocStyle handle f doc) pretty prints -- doc to file handle handle using the annotations. -- -- The annotations are mapped by f to [SetStyle] -- arrays. hPutDocStyle :: Handle -> (a -> [SetStyle]) -> Doc a -> IO () -- | The action (putDocStyle f doc) pretty prints doc to -- stdout using the annotations. -- -- The annotations are mapped by f to [SetStyle] -- arrays. putDocStyle :: (a -> [SetStyle]) -> Doc a -> IO ()