| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
DDC.Data.Pretty
Contents
Description
- class Pretty a where
- data PrettyMode a
- pprParen :: Bool -> Doc -> Doc
- padL :: Int -> Doc -> Doc
- data RenderMode
- render :: RenderMode -> Doc -> String
- renderPlain :: Doc -> String
- renderIndent :: Doc -> String
- putDoc :: RenderMode -> Doc -> IO ()
- putDocLn :: RenderMode -> Doc -> IO ()
Documentation
Minimal complete definition
Associated Types
data PrettyMode a Source #
Methods
pprDefaultMode :: PrettyMode a Source #
pprPrec :: Int -> a -> Doc Source #
pprModePrec :: PrettyMode a -> Int -> a -> Doc Source #
Instances
| Pretty Bool Source # | |
| Pretty Char Source # | |
| Pretty Int Source # | |
| Pretty Integer Source # | |
| Pretty () Source # | |
| Pretty SourcePos Source # | |
| Pretty Universe Source # | |
| Pretty CheckTrace Source # | |
| Pretty Demand Source # | |
| Pretty a => Pretty [a] Source # | |
| Pretty a => Pretty (Set a) Source # | |
| (Eq n, Pretty n) => Pretty (Mode n) Source # | |
| (Pretty a, Pretty b) => Pretty (a, b) Source # | |
| Pretty (AnT a n) Source # | |
| Pretty (AnTEC a n) Source # | |
| (Pretty n, Eq n) => Pretty (Error a n) Source # | |
| (Eq n, Show n, Pretty n, Pretty (err (AnTEC SourcePos n))) => Pretty (Error n err) Source # | |
Rendering
data RenderMode Source #
How to pretty print a doc.
Constructors
| RenderPlain | Render the doc with indenting. |
| RenderIndent | Render the doc without indenting. |
Instances
render :: RenderMode -> Doc -> String Source #
Render a doc with the given mode.
renderPlain :: Doc -> String Source #
Convert a Doc to a string without indentation.
renderIndent :: Doc -> String Source #
Convert a Doc to a string with indentation
putDoc :: RenderMode -> Doc -> IO () Source #
Put a Doc to stdout using the given mode.
putDocLn :: RenderMode -> Doc -> IO () Source #
Put a Doc to stdout using the given mode.