ContentsIndex
Doc.Pretty
Description
Modification od Daan Leijens pretty printer. main changes are use of Doc.DocLike framework and the addition of out-of-band data for html tags or ansi escape codes
Synopsis
data Doc
putDoc :: Doc -> IO ()
hPutDoc :: Handle -> Doc -> IO ()
putDocM :: Monad m => (String -> m ()) -> Doc -> m ()
putDocMLn :: Monad m => (String -> m ()) -> Doc -> m ()
hsep :: DocLike a => [a] -> a
hcat :: DocLike a => [a] -> a
vcat :: DocLike a => [a] -> a
errorDoc :: Doc -> a
failDoc :: Monad m => Doc -> m a
group :: Doc -> Doc
data SimpleDoc
= SEmpty
| SChar Char SimpleDoc
| SText !Int String SimpleDoc
| SLine !Int SimpleDoc
renderPretty :: Float -> Int -> Doc -> SimpleDoc
renderCompact :: Doc -> SimpleDoc
displayS :: SimpleDoc -> ShowS
displayIO :: Handle -> SimpleDoc -> IO ()
displayM :: Monad m => (String -> m ()) -> SimpleDoc -> m ()
textProc :: (Char -> String) -> String -> Doc
oob :: String -> Doc
Documentation
data Doc
Instances
Monoid Doc
TextLike Doc
DocLike Doc
Show Doc
putDoc :: Doc -> IO ()
hPutDoc :: Handle -> Doc -> IO ()
putDocM :: Monad m => (String -> m ()) -> Doc -> m ()
putDocMLn :: Monad m => (String -> m ()) -> Doc -> m ()
hsep :: DocLike a => [a] -> a
hcat :: DocLike a => [a] -> a
vcat :: DocLike a => [a] -> a
errorDoc :: Doc -> a
failDoc :: Monad m => Doc -> m a
group :: Doc -> Doc
data SimpleDoc
Constructors
SEmpty
SChar Char SimpleDoc
SText !Int String SimpleDoc
SLine !Int SimpleDoc
renderPretty :: Float -> Int -> Doc -> SimpleDoc
renderCompact :: Doc -> SimpleDoc
displayS :: SimpleDoc -> ShowS
displayIO :: Handle -> SimpleDoc -> IO ()
displayM :: Monad m => (String -> m ()) -> SimpleDoc -> m ()
textProc :: (Char -> String) -> String -> Doc
oob :: String -> Doc
out of band data. This text will appear in the pretty printed output but won't count towards formatting, as far as pretty printing is concerned, it is of length 0.
Produced by Haddock version 0.6