Basic low-level types and their combinators. These are used as output of the compiler. Everything here is untypes and not supposed for public use!
- type Expr = E ExprE
- data ExprE = ExprE Expr
- data E expr
- type Id = String
- data Stmt
- data Type
- data Rhs
- showExpr :: Bool -> Expr -> String
- showStmt :: Stmt -> String
- operator :: Id -> [Expr] -> Expr
- binOp :: String -> Expr -> Expr -> E ExprE
- uniOp :: String -> Expr -> E ExprE
- literal :: String -> Expr
- scopeForEffect :: [Stmt] -> Expr
|Dot expr expr Type|
Field/attribute access (with type information):
|Apply expr [expr]|
|Function [Id] [Stmt]|
Anonymous function with parameter names and body.
|AssignStmt Rhs Expr|
Expression statement, for the sake of its side effects:
|IfStmt Expr [Stmt] [Stmt]|
|WhileStmt Expr [Stmt]|
A comment in the code:
Base type like object or other primtive types.
Unit or void type. There is a effect but no value.
|Fun [Type] Type|
A Right hand side of an assignment.
Combinator to create a operator/function applied to the given arguments.
Short-hand to create the applied binary operator/function.
Short-hand to create the applied unary operator/function.
Combinator to create a expression containing a literal in form of a string.