Safe Haskell | None |
---|
- module Text.PrettyPrint.Leijen
- class Pretty a where
- data PrettyMode a
- pprDefaultMode :: PrettyMode a
- ppr :: a -> Doc
- pprPrec :: Int -> a -> Doc
- pprModePrec :: PrettyMode a -> Int -> a -> Doc
- pprParen :: Bool -> Doc -> Doc
- data RenderMode
- render :: RenderMode -> Doc -> String
- renderPlain :: Doc -> String
- renderIndent :: Doc -> String
- putDoc :: RenderMode -> Doc -> IO ()
- putDocLn :: RenderMode -> Doc -> IO ()
Documentation
module Text.PrettyPrint.Leijen
data PrettyMode a Source
pprDefaultMode :: PrettyMode aSource
pprPrec :: Int -> a -> DocSource
pprModePrec :: PrettyMode a -> Int -> a -> DocSource
Rendering
data RenderMode Source
How to pretty print a doc.
RenderPlain | Render the doc with indenting. |
RenderIndent | Render the doc without indenting. |
render :: RenderMode -> Doc -> StringSource
Render a doc with the given mode.
renderPlain :: Doc -> StringSource
Convert a Doc
to a string without indentation.
renderIndent :: Doc -> StringSource
Convert a Doc
to a string with indentation