Copyright | (c) Henrique Ferreiro García 2008 (c) David Castro Pérez 2008 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Alex Kropivny <alex.kropivny@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell98 |
Pretty printer for CoreErlang.
- class Pretty a
- prettyPrintStyleMode :: Pretty a => Style -> PPMode -> a -> String
- prettyPrintWithMode :: Pretty a => PPMode -> a -> String
- prettyPrint :: Pretty a => a -> String
- data Style :: * = Style {
- mode :: Mode
- lineLength :: Int
- ribbonsPerLine :: Float
- style :: Style
- data Mode :: *
- data PPMode = PPMode {}
- type Indent = Int
- data PPLayout
- defaultMode :: PPMode
Pretty printing
Things that can be pretty-printed, including all the syntactic objects in Language.CoreErlang.Syntax.
Pretty TimeOut Source # | |
Pretty Guard Source # | |
Pretty Alias Source # | |
Pretty Pat Source # | |
Pretty Pats Source # | |
Pretty Alt Source # | |
Pretty Exp Source # | |
Pretty Exps Source # | |
Pretty Literal Source # | |
Pretty FunDef Source # | |
Pretty Const Source # | |
Pretty Module Source # | |
Pretty Function Source # | |
Pretty Atom Source # | |
Pretty a => Pretty (Ann a) Source # | |
Pretty a => Pretty (List a) Source # | |
Pretty a => Pretty (BitString a) Source # | |
prettyPrintStyleMode :: Pretty a => Style -> PPMode -> a -> String Source #
pretty-print with a given style and mode.
prettyPrintWithMode :: Pretty a => PPMode -> a -> String Source #
pretty-print with the default style and a given mode.
prettyPrint :: Pretty a => a -> String Source #
pretty-print with the default style and defaultMode
.
Pretty-printing styles (from -- Text.PrettyPrint.HughesPJ)
A rendering style. Allows us to specify constraints to choose among the many different rendering options.
Style | |
|
Rendering mode.
PageMode | Normal rendering ( |
ZigZagMode | With zig-zag cuts. |
LeftMode | No indentation, infinitely long lines ( |
OneLineMode | All on one line, |
CoreErlang formatting modes
Pretty-printing parameters.
PPMode | |
|
Varieties of layout we can use.
PPDefault | classical layout |
PPNoLayout | everything on a single line |
defaultMode :: PPMode Source #
The default mode: pretty-print using sensible defaults.