Copyright | (c) Abhinav Gupta 2015 |
---|---|
License | BSD3 |
Maintainer | Abhinav Gupta <mail@abhinavg.net> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module provides a pretty printer for Thrift IDLs. The pretty printer prserves docstrings specified for types.
The specifics of the printer can be configured using Config
objects.
- prettyPrint :: Program ann -> Doc
- program :: Config -> Program ann -> Doc
- header :: Header -> Doc
- definition :: Config -> Definition ann -> Doc
- function :: Config -> Function ann -> Doc
- fieldType :: Config -> FieldType -> Doc
- constantValue :: Config -> ConstValue -> Doc
- data Config = Config {
- indentWidth :: Int
- defaultConfig :: Config
Documentation
prettyPrint :: Program ann -> Doc Source
Top-level pretty printer for Thrift documents that uses the default
configuration (defaultConfig
) for pretty printing.
Components
definition :: Config -> Definition ann -> Doc Source
Print a constant, type, or service definition.
constantValue :: Config -> ConstValue -> Doc Source
Pretty print a constant value.
Configuration
Configuration for the pretty printer.
Config | |
|
defaultConfig :: Config Source
Default pretty printing configuration.