Copyright | (c) Paweł Nowak |
---|---|
License | MIT |
Maintainer | Paweł Nowak <pawel834@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Provides a very simple indentation as a category transformer.
Documentation
Adds indentation to a syntax description.
CatTrans Indent | |
Category * cat => Category * (Indent cat) | |
SIArrow cat => SIArrow (Indent cat) | |
Products cat => Products (Indent cat) | |
Coproducts cat => Coproducts (Indent cat) | |
CatPlus cat => CatPlus (Indent cat) | |
Syntax syn => Syntax (Indent syn) | |
SyntaxChar syn => SyntaxChar (Indent syn) | |
type Seq (Indent syn) = Seq syn |
runIndent :: Indent cat a b -> cat () () -> cat a b Source
runIndent m tab
runs the Indent
transformer using tab
once for each
level of indentation.
breakLine :: SyntaxChar syn => Indent syn () () Source
Inserts a new line and correct indentation, but does not require any formatting when parsing (it just skips all white space).