Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- module Prettyprinter
- (.$.) :: Doc -> Doc -> Doc
- groupOrNestLine :: Doc -> Doc
- altSep :: Doc -> Doc -> Doc
- data Ann
- type Doc = Doc Ann
- enclose :: Doc -> Doc -> Doc -> Doc
- parens :: Doc -> Doc
- brackets :: Doc -> Doc
- hang :: Int -> Doc -> Doc
- indent :: Int -> Doc -> Doc
- nest :: Int -> Doc -> Doc
- text :: String -> Doc
- plain :: Doc -> Doc
- deunderline :: Doc -> Doc
- underline :: Doc -> Doc
- debold :: Doc -> Doc
- bold :: Doc -> Doc
- ondullwhite :: Doc -> Doc
- onwhite :: Doc -> Doc
- ondullcyan :: Doc -> Doc
- oncyan :: Doc -> Doc
- ondullmagenta :: Doc -> Doc
- onmagenta :: Doc -> Doc
- ondullblue :: Doc -> Doc
- onblue :: Doc -> Doc
- ondullyellow :: Doc -> Doc
- onyellow :: Doc -> Doc
- ondullgreen :: Doc -> Doc
- ongreen :: Doc -> Doc
- ondullred :: Doc -> Doc
- onred :: Doc -> Doc
- ondullblack :: Doc -> Doc
- onblack :: Doc -> Doc
- dullwhite :: Doc -> Doc
- white :: Doc -> Doc
- dullcyan :: Doc -> Doc
- cyan :: Doc -> Doc
- dullmagenta :: Doc -> Doc
- magenta :: Doc -> Doc
- dullblue :: Doc -> Doc
- blue :: Doc -> Doc
- dullyellow :: Doc -> Doc
- yellow :: Doc -> Doc
- dullgreen :: Doc -> Doc
- green :: Doc -> Doc
- dullred :: Doc -> Doc
- red :: Doc -> Doc
- dullblack :: Doc -> Doc
- black :: Doc -> Doc
- (</>) :: Doc -> Doc -> Doc
- (<$$>) :: Doc -> Doc -> Doc
- (<//>) :: Doc -> Doc -> Doc
- string :: String -> Doc
- isEffectivelyEmpty :: Doc -> Bool
- renderShowS :: SimpleDocStream ann -> ShowS
Documentation
module Prettyprinter
groupOrNestLine :: Doc -> Doc Source #
Render flattened text on this line, or start a new line before rendering any text.
This will also nest subsequent lines in the group.
altSep :: Doc -> Doc -> Doc Source #
Separate items in an alternative with a pipe.
If the first document and the pipe don't fit on the line, then mandatorily flow the next entry onto the following line.
The ( // ) softbreak ensures that if the document does fit on the line, there is at least a space, but it's possible for y to still appear on the next line.
deunderline :: Doc -> Doc Source #
ondullwhite :: Doc -> Doc Source #
ondullcyan :: Doc -> Doc Source #
ondullmagenta :: Doc -> Doc Source #
ondullblue :: Doc -> Doc Source #
ondullyellow :: Doc -> Doc Source #
ondullgreen :: Doc -> Doc Source #
ondullblack :: Doc -> Doc Source #
dullmagenta :: Doc -> Doc Source #
dullyellow :: Doc -> Doc Source #
isEffectivelyEmpty :: Doc -> Bool Source #
Determine if the document is empty when rendered
renderShowS :: SimpleDocStream ann -> ShowS Source #
Render a
SimpleDocStream
to a
ShowS
, useful to write
Show
instances
based on the prettyprinter.
instanceShow
MyType whereshowsPrec
_ =renderShowS
.layoutPretty
defaultLayoutOptions
.pretty