An identifier with the given string as its name. The string should be a valid Haskell identifier.
Modulehaskell-src-exts-1.23.1Haskell98
Language.Haskell.Exts.Build
This module contains combinators to use when building Haskell source trees programmatically, as opposed to parsing them from a string. The contents here are quite experimental and will likely receive a lot of attention when the rest has stabilised.
- 46 values
- Packagehaskell-src-exts-1.23.1
- Exports46
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceBuild.hs
Syntax building functions
39 declarationsA symbol identifier. The string should be a valid Haskell symbol identifier.
A local variable as expression.
Use the given identifier as an operator.
A qualified variable as expression.
A pattern variable.
Application of expressions by juxtaposition.
Apply an operator infix.
Apply a function to a list of arguments.
A constructor pattern, with argument patterns.
A tuple expression.
A tuple pattern.
A tuple expression consisting of variables only.
A tuple pattern consisting of variables only.
A function with a given name.
A literal string expression.
A literal character expression.
A literal integer expression.
A literal string pattern.
A literal character pattern.
A literal integer pattern.
A do block formed by the given statements. The last statement in the list should be a Qualifier expression.
Lambda abstraction, given a list of argument patterns and an expression body.
A let ... in block.
A case expression.
An unguarded alternative in a case expression.
An alternative with a single guard in a case expression.
A list expression.
The empty list expression.
The empty list pattern.
Put parentheses around an expression.
Put parentheses around a pattern.
A qualifier expression statement.
A generator statement: pat <- exp
A let binding group as a statement.
Hoist a set of declarations to a binding group.
An empty binding group.
The wildcard pattern: _
Generate k names by appending numbers 1 through k to a given string.
More advanced building
7 declarationsA function with a single clause
A function with a single clause, a single argument, no guards and no where declarations
A pattern bind where the pattern is a variable, and where
there are no guards and no where clause.
A pattern bind where the pattern is a variable, and where
there are no guards, but with a where clause.
Bind an identifier to an expression.
Apply function of a given name to a list of arguments.
Apply a constructor of a given name to a list of pattern arguments, forming a constructor pattern.