Module Interpret_lib.Interpret

type error =
  1. | Parse_error of string
  2. | Unbound_variable of string
  3. | Division_by_zero
  4. | Not_a_function
  5. | Type_error of string
  6. | Steps_exceeded
type state = {
  1. steps : int;
  2. output : string list;
}
type 'a t = state -> ('a * state, error) Stdlib.result
type value =
  1. | VInt of int
  2. | VClosure of Ast.id * Ast.expr * env
  3. | VBuiltin of value -> value t
and env = (Ast.id * value) list
val return : 'a -> 'a t
val pp_value : Stdlib.Format.formatter -> value -> unit
val format_value : value -> string
val format_error : error -> string
val run : ?steps:int -> string -> (value * string list, error) Stdlib.result