Module ExpressionsCore

module ExpressionsCore: sig .. end
This module defines the syntax of expressions.


The definition of expressions


type tag_update_info = SurfaceSyntax.tag_update_info 
type field = SurfaceSyntax.field 
type pattern = 
| PVar of Variable.name * TypeCore.location
| PTuple of pattern list
| PConstruct of TypeCore.resolved_datacon
* (TypeCore.Field.name * pattern) list
| POpen of TypeCore.var
| PAs of pattern * pattern
| PAny
The type of patterns. We don't have type annotations anymore, they have been transformed into type annotations onto the corresponding expression, i.e. EConstraint nodes.
type rec_flag = SurfaceSyntax.rec_flag = 
| Nonrecursive
| Recursive
type expression = 
| EConstraint of expression * TypeCore.typ
| EVar of TypeCore.db_index
| EOpen of TypeCore.var
| EBuiltin of string
| ELet of rec_flag * patexpr list
* expression
| ELetFlex of (TypeCore.type_binding * TypeCore.flavor) * expression
| ELocalType of TypeCore.data_type_group * expression
| EBigLambdas of (TypeCore.type_binding * TypeCore.flavor) list * expression
| ELambda of TypeCore.typ * TypeCore.typ * expression
| EAssign of expression * field
* expression
| EAssignTag of expression * TypeCore.resolved_datacon
* tag_update_info
| EAccess of expression * field
| EAssert of TypeCore.typ
| EPack of TypeCore.typ * TypeCore.typ
| EApply of expression * expression
| ETApply of expression * tapp * Kind.kind
| EMatch of bool * expression * patexpr list
| ETuple of expression list
| EConstruct of TypeCore.resolved_datacon
* (TypeCore.Field.name * expression) list
| EIfThenElse of bool * expression * expression
* expression
| ELocated of expression * TypeCore.location
| EInt of int
| EExplained of expression
| EGive of expression * expression
| ETake of expression * expression
| EOwns of expression * expression
| EFail
This is not very different from SurfaceSyntax.expression. Some nodes such as ESequence have been removed.
type tapp = 
| Ordered of TypeCore.typ
| Named of Variable.name * TypeCore.typ
type patexpr = pattern * expression 
type definitions = TypeCore.location * rec_flag *
(pattern * expression) list
type sig_item = Variable.name * TypeCore.typ 
type toplevel_item = 
| DataTypeGroup of TypeCore.data_type_group
| ValueDefinitions of definitions
| ValueDeclaration of sig_item
type implementation = toplevel_item list 
type interface = toplevel_item list