Ast.TypedAst
AST with types
value
are the possible values for the dyri language
typ
are the possible types for the language After the typing stage every variable will have one of these types typ ::= | int | bool | str | typ -> typ | None
and desc =
| Const of value | |
| Op of stmt * op * stmt | |
| Var of string | |
| Apply of string * stmt list | |
| Let of string * stmt | |
| Fun of string * stmt | |
| AnFun of string * stmt | |
| If | |
| For | |
| Loop | (* Block have a return typ *) |
| Block of stmt list |
desc
possible statements to use inside the Dyri language
type code = stmt list
code
stores all the AST code from a string/file