An identifier with the given string as its name. The string should be a valid Haskell identifier.
Modulehaskell-src-exts-1.24.0Haskell98
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.
Synopsis
- value name
- value sym
- value var
- value op
- value qvar
- value pvar
- value app
- value infixApp
- value appFun
- value pApp
- value tuple
- value pTuple
- value varTuple
- value pvarTuple
- value function
- value strE
- value charE
- value intE
- value strP
- value charP
- value intP
- value doE
- value lamE
- value letE
- value caseE
- value alt
- value altGW
- value listE
- value eList
- value peList
- value paren
- value pParen
- value qualStmt
- value genStmt
- value letStmt
- value binds
- value noBinds
- value wildcard
- value genNames
- value sfun
- value simpleFun
- value patBind
- value patBindWhere
- value nameBind
- value metaFunction
- value metaConPat
- Packagehaskell-src-exts-1.24.0
- Exports46
- LanguageHaskell98
- LicenceBSD-3-Clause
- SourceBuild.hs
Syntax building functions
A 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
A 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.