Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains the definition of expressions for our lifted intermediate language.
Synopsis
- data Expr
- = Con { }
- | SmartCon { }
- | Var {
- exprSrcSpan :: SrcSpan
- exprVarName :: VarName
- exprAgdaVarName :: QName
- exprCoqVarIdent :: Qualid
- | App {
- exprSrcSpan :: SrcSpan
- exprAppFunc :: Expr
- exprAppTypeArgs :: [Type]
- exprEffects :: [Effect]
- exprAppArgs :: [Expr]
- exprFreeArgs :: Bool
- | If {
- exprSrcSpan :: SrcSpan
- ifExprCond :: Expr
- ifExprThen :: Expr
- ifExprElse :: Expr
- | Case {
- exprSrcSpan :: SrcSpan
- caseExprScrutinee :: Expr
- caseExprAlts :: [Alt]
- | Undefined { }
- | ErrorExpr { }
- | Trace { }
- | IntLiteral { }
- | StringLiteral { }
- | Lambda {
- exprSrcSpan :: SrcSpan
- lambdaExprArgs :: [VarPat]
- lambdaExprRhs :: Expr
- | Pure { }
- | Bind { }
- | Share { }
- data Alt = Alt {
- altSrcSpan :: SrcSpan
- altConPat :: ConPat
- altVarPats :: [VarPat]
- altRhs :: Expr
- data ConPat = ConPat {}
- data VarPat = VarPat {
- varPatSrcSpan :: SrcSpan
- varPatIdent :: String
- varPatType :: Maybe Type
- varPatAgdaIdent :: QName
- varPatCoqIdent :: Qualid
Documentation
An expression.
Con | A constructor. |
| |
SmartCon | A smart constructor. |
| |
Var | A function or local variable. |
| |
App | Function or constructor application. |
| |
If |
|
| |
Case |
|
| |
Undefined | Error term |
ErrorExpr | Error term |
Trace | Effect |
IntLiteral | An integer literal. |
StringLiteral | A string literal. |
Lambda | A lambda abstraction. |
| |
Pure | The |
| |
Bind | The bind operator for the free monad. |
| |
Share | The |
|
One alternative of a case
expression.
Alt | |
|
A constructor pattern used in an alternative of a case
expression.
The main purpose of this data type is to add location information
to a ConName
.
A variable pattern used as an argument to a function, lambda abstraction or constructor pattern.
The variable pattern can optionally have a type signature.
VarPat | |
|