Safe Haskell | None |
---|---|
Language | Haskell98 |
The core functional representation
- data Expr a
- data Bind a
- type Guard a = Expr a
- data CaseAlternative a = CaseAlternative {
- caseAlternativeBinders :: [Binder a]
- caseAlternativeResult :: Either [(Guard a, Expr a)] (Expr a)
- extractAnn :: Expr a -> a
- modifyAnn :: (a -> a) -> Expr a -> Expr a
Documentation
Data type for expressions and terms
Literal a (Literal (Expr a)) | A literal value |
Constructor a ProperName ProperName [Ident] | A data constructor (type name, constructor name, field names) |
Accessor a String (Expr a) | A record property accessor |
ObjectUpdate a (Expr a) [(String, Expr a)] | Partial record update |
Abs a Ident (Expr a) | Function introduction |
App a (Expr a) (Expr a) | Function application |
Var a (Qualified Ident) | Variable |
Case a [Expr a] [CaseAlternative a] | A case expression |
Let a [Bind a] (Expr a) | A let binding |
A let or module binding.
A guard is just a boolean-valued expression that appears alongside a set of binders
data CaseAlternative a Source
An alternative in a case statement
CaseAlternative | |
|
Functor CaseAlternative | |
Data a => Data (CaseAlternative a) | |
Show a => Show (CaseAlternative a) | |
Typeable (* -> *) CaseAlternative |
extractAnn :: Expr a -> a Source
Extract the annotation from a term