https://github.com/FujiiMaika/fscd21.git
Revision e388208899f7c8ac15683de58242d59371531f3a authored by Maika Fujii on 24 June 2021, 05:42:20 UTC, committed by GitHub on 24 June 2021, 05:42:20 UTC
1 parent ee3dc24
Tip revision: e388208899f7c8ac15683de58242d59371531f3a authored by Maika Fujii on 24 June 2021, 05:42:20 UTC
Update README.md
Update README.md
Tip revision: e388208
value.ml
open Syntax
(* Definitional interpreter for lambda-calculus with 4 delimited-control operators : eval1 *)
(* Value *)
type v = VNum of int
| VFun of (v -> c -> t -> m -> v)
| VContS of c * t
| VContC of c * t
and c = v -> t -> m -> v
and t = TNil | Trail of (v -> t -> m -> v)
and m = MNil | MCons of (c * t) * m
(* to_string : v -> string *)
let rec to_string value = match value with
VNum (n) -> string_of_int n
| VFun (_) -> "<VFun>"
| VContS (_) -> "<VContS>"
| VContC (_) -> "<VContC>"
(* Value.print : v -> unit *)
let print exp =
let str = to_string exp in
print_string str

Computing file changes ...