Commit a780a8f4 authored by Pietro Abate's avatar Pietro Abate
Browse files

More work on the delayed evaluation algorithm

parent bafc0253
......@@ -22,7 +22,7 @@ type var_loc =
(* Only for the toplevel *)
| Dummy
let iface = (Types.t * Types.t) list
type iface = (Types.t * Types.t) list
type sigma =
| Identity
......
......@@ -269,7 +269,7 @@ let eval_toplevel = function
| LetDecls (e,lsize,disp,n) ->
let v = expr e lsize in
(* XXX Env.empty ??? *)
let (_, bindings) = Run_dispatch.run_dispatcher Env.empty disp v in
let (_, bindings) = Run_dispatch.run_dispatcher [||] disp v in
ensure globs (!nglobs + n);
Array.blit bindings 0 !globs !nglobs n;
nglobs := !nglobs + n
......@@ -293,7 +293,7 @@ let eval_unit globs nglobs = function
| LetDecls (e,lsize,disp,n) ->
let v = expr e lsize in
(* XXX Env.empty ??? *)
let (_, bindings) = Run_dispatch.run_dispatcher Env.empty disp v in
let (_, bindings) = Run_dispatch.run_dispatcher [||] disp v in
Array.blit bindings 0 globs !nglobs n;
nglobs := !nglobs + n
| LetDecl (e,lsize) ->
......
......@@ -6,12 +6,12 @@ val print: Format.formatter -> t -> unit
val to_string: t -> string
val simplify: t -> t
val explain: Auto_pat.state -> Value.t -> t option
val check: Auto_pat.state -> Value.t -> unit
val explain: Value.t array -> Auto_pat.state -> Value.t -> t option
val check: Value.t array -> Auto_pat.state -> Value.t -> unit
(** Same, but raise [Failed]. *)
val do_check: Auto_pat.state -> Value.t -> Value.t
val do_check: Value.t array -> Auto_pat.state -> Value.t -> Value.t
(** Same, but raise a CDuce exception. *)
val check_failure: Auto_pat.state -> Value.t -> Value.t
val check_failure: Value.t array -> Auto_pat.state -> Value.t -> Value.t
(** Raise [Failure ...]. *)
val run_dispatcher: Auto_pat.state -> Value.t -> int * Value.t array
val run_dispatcher: Value.t array -> Auto_pat.state -> Value.t -> int * Value.t array
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment