let rules = [
- one_to_one "scm" "ho" begin fun {scm = {scm_cmd=scm_cmd; includes=includes; link_std=link_std}} input output ->
- [Printf.sprintf "%s -c -I %s -o %s %s %s"
- scm_cmd includes output
- (if link_std then "std.ho" else "")
- input ]
+ one_to_one "scm" "ho" begin fun {scm = {scm_cmd=scm_cmd; includes=includes} } input output ->
+ [Printf.sprintf "%s -c -I %s -o %s %s"
+ scm_cmd includes output input ]
end;
many_to_one ["scm"] "abc" begin fun {scm = {scm_cmd=scm_cmd; includes=includes;link_std=link_std}} inputs output ->
[Printf.sprintf "%s -I %s -o %s %s %s"
exception Unbound_var of (string list * string) Node.t
exception Forbidden_var of (string list * string) Node.t
exception Unbound_method of string Node.t
+exception Unbound_module of string list Node.t
(* ------------------------------
environments
env',`Class {c with
super = bind_qname env super;
methods = methods'}
- | `Open { Node.value = name}->
+ | `Open ({ Node.value = name} as m) ->
(* fixme *)
- {env with opened = (bind_module name env)::env.opened}, stmt
+ try
+ {env with opened = (bind_module name env)::env.opened}, stmt
+ with Not_found ->
+ raise @@ Unbound_module m
let bind table program =
let env = {