Module Interpret

type error = [
  1. | `UnknownVariable of string
  2. | `TypeError of string
  3. | `DivisionByZero
  4. | `StepLimitReached
]
type value =
  1. | VInt of int
  2. | VClosure of Ast.name * Ast.expr * env
  3. | VRecClosure of Ast.name * Ast.name * Ast.expr * env
  4. | VBuiltin of value -> (value, error) Stdlib.Result.t
and env = (Ast.name * value) list
val pp_error : Stdlib.Format.formatter -> error -> unit
val string_of_value : value -> string
val initial_env : env
val eval : ?step_limit:int -> ?env:env -> unit -> Ast.expr -> (value, error) Stdlib.Result.t
val parse_and_run : ?step_limit:int -> string -> (string, error) Stdlib.Result.t