 | haskell-src-exts-1.3.5: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer | Source code | Contents | Index |
|
Language.Haskell.Exts.Pretty | |
|
|
|
|
Description |
Pretty printer for Haskell with extensions.
|
|
Synopsis |
|
|
|
|
Pretty printing
|
|
|
|
|
|
pretty-print with a given style and mode.
|
|
|
pretty-print with the default style and a given mode.
|
|
|
pretty-print with the default style and defaultMode.
|
|
Pretty-printing styles (from Text.PrettyPrint.HughesPJ)
|
|
|
A rendering style.
| Constructors | Style | | mode :: Mode | The rendering mode
| lineLength :: Int | Length of line, in chars
| ribbonsPerLine :: Float | Ratio of ribbon length to line length
|
|
|
|
|
|
The default style (mode=PageMode, lineLength=100, ribbonsPerLine=1.5).
|
|
|
Rendering mode.
| Constructors | PageMode | Normal
| ZigZagMode | With zig-zag cuts
| LeftMode | No indentation, infinitely long lines
| OneLineMode | All on one line
|
|
|
|
Haskell formatting modes
|
|
|
Pretty-printing parameters.
Note: the onsideIndent must be positive and less than all other indents.
| Constructors | PPHsMode | | classIndent :: Indent | indentation of a class or instance
| doIndent :: Indent | indentation of a do-expression
| caseIndent :: Indent | indentation of the body of a
case expression
| letIndent :: Indent | indentation of the declarations in a
let expression
| whereIndent :: Indent | indentation of the declarations in a
where clause
| onsideIndent :: Indent | indentation added for continuation
lines that would otherwise be offside
| spacing :: Bool | blank lines between statements?
| layout :: PPLayout | Pretty-printing style to use
| linePragmas :: Bool | add GHC-style LINE pragmas to output?
|
|
|
|
|
|
|
|
Varieties of layout we can use.
| Constructors | PPOffsideRule | classical layout
| PPSemiColon | classical layout made explicit
| PPInLine | inline decls, with newlines between them
| PPNoLayout | everything on a single line
|
| Instances | |
|
|
|
The default mode: pretty-print using the offside rule and sensible
defaults.
|
|
Produced by Haddock version 2.6.0 |