Mini_ml_lib.AstType for name of variable, used in variable, abstraction, let, letrec
Type for any unary operation in language
type binary_operation = | AddAddition a + b
| SubSubtraction a - b
| MulMultiplication a * b
| DivDivision a / b
| ModRemainder a mod b
| Anda && b
| Ora || b
| EqualComparing on equal a = b
| NotEqualComparing on not eqaul a <> b
| LessCompare on less a < b
| LessEqualCompare on less or equal a <= b
| GreaterCompare on greater a > b
| GreaterEqualCompare on greater or equal a >= b
Type for any binary operation in language
Type for indicating recursive let expression
type t = | UnitUnit literal
*)| Int of intInteger literal 42
| Bool of boolBoolean literal true
| Var of nameVariable x
| Tuple of t * t * t listTuple (x, y, ..., z)
| UnaryOp of unary_operation * tUnary operation ..y
| BinaryOp of binary_operation * t * tBinary operation x .. y
| IfThenElse of t * t * tIf-then-else expression if ... then ... else ...
| LetExpr of let_mnemonic * name * t * tLet expression let x = ... in ...
| Abstraction of name * tLambda abstraction fun x -> ...
| Application of t * tApplication (f x)
| Exception of string * tException declaration let exception E1 in ...
| TryWith of t * string * tTry with statement try (...) with ... -> (...)
| Raise of tFail with statement raise ...
Type for abstract-syntax tree node
val show_ast_verbose : t -> stringShows AST in verbose format
val show_ast : t -> stringShows AST in human readable format
val show_name : name -> stringShows name of any named entity in AST