syntax-0.3.0.0: Syntax descriptions for unified parsing and pretty-printing.

Copyright(c) Paweł Nowak
LicenseMIT
MaintainerPaweł Nowak <pawel834@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Syntax.Indent

Description

Provides a very simple indentation as a "monad" transformer.

Synopsis

Documentation

data Indent m a Source

Adds indentation to a syntax description.

runIndent :: Indent m a -> m () -> m a Source

runIndent m tab runs the Indent transformer using tab once for each level of indentation.

breakLine :: SyntaxChar syn seq => Indent syn () Source

Inserts a new line and correct indentation, but does not require any formatting when parsing (it just skips all white space).

indented :: Indent m a -> Indent m a Source

Increases the indentation level of its argument by one.