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
]
module Env : Stdlib.Map.S with type key = Interpret_lib.Ast.id
type value =
  1. | VInt of int
  2. | VClosure of Ast.id * Ast.expr * env
  3. | VRecClosure of Ast.id * Ast.id * Ast.expr * env
  4. | VBuiltin of string
and env = value Env.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