dhall-1.19.1: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Pretty

Contents

- Pretty

Description

This module contains logic for pretty-printing expressions, including support for syntax highlighting

Synopsis

- data Ann
  - = Keyword
  - | Syntax
  - | Label
  - | Literal
  - | Builtin
  - | Operator
- annToAnsiStyle :: Ann -> AnsiStyle
- prettyExpr :: Pretty a => Expr s a -> Doc Ann
- data CharacterSet
  - = ASCII
  - | Unicode
- prettyCharacterSet :: Pretty a => CharacterSet -> Expr s a -> Doc Ann
- layoutOpts :: LayoutOptions

# Pretty

data Ann Source #

Annotation type used to tag elements in a pretty-printed document for syntax highlighting purposes

Constructors

Keyword | Used for syntactic keywords
Syntax | Syntax punctuation such as commas, parenthesis, and braces
Label | Record labels
Literal | Literals such as integers and strings
Builtin | Builtin types and values
Operator | Operators

annToAnsiStyle :: Ann -> AnsiStyle Source #

Convert annotations to their corresponding color for syntax highlighting purposes

prettyExpr :: Pretty a => Expr s a -> Doc Ann Source #

Pretty print an expression

data CharacterSet Source #

Constructors

ASCII |
Unicode |

prettyCharacterSet :: Pretty a => CharacterSet -> Expr s a -> Doc Ann Source #

layoutOpts :: LayoutOptions Source #

Default layout options