open Syntax (* Value *) type v = VNum of int | VFun of (v -> c -> s -> t -> m -> v) | VEnv of v list and f = COp1 of e * string list * op | COp2 of op | CApp1 of e * string list | CApp2 | CPerform | CPerformShallow and c = f list and s = v list and t = TNil | Trail of (v -> t -> m -> v) and m = MNil | MCons of (c * s * t * h) * m and h = v -> v -> c -> s -> t -> m -> v (* to_string : v -> string *) let rec to_string value = match value with VNum n -> string_of_int n | VFun _ -> "" | VEnv _ -> "" (* Value.print : v -> unit *) let print exp = let str = to_string exp in print_string str