summaryrefslogtreecommitdiff
path: root/src/ocaml_backend.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-10-04 11:37:28 +0100
committerAlasdair Armstrong2017-10-04 11:37:28 +0100
commita41d08d4f33f778eee98aa4094eaa4f94fc134c0 (patch)
tree94a07f1d1d8d70ec7ccf5e30528af809664f02d2 /src/ocaml_backend.ml
parent34981979b4fac0e97e0e124616a3a36aa96ee6af (diff)
parentce905a7bd4b6a25f784f94fd926f818e8827d295 (diff)
Merge branch 'cleanup' into experiments
Diffstat (limited to 'src/ocaml_backend.ml')
-rw-r--r--src/ocaml_backend.ml8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ocaml_backend.ml b/src/ocaml_backend.ml
index 1e2c8bc6..38b3cc9d 100644
--- a/src/ocaml_backend.ml
+++ b/src/ocaml_backend.ml
@@ -150,7 +150,7 @@ let rec ocaml_exp ctx (E_aux (exp_aux, _) as exp) =
| _ -> string ("EXP(" ^ string_of_exp exp ^ ")")
and ocaml_letbind ctx (LB_aux (lb_aux, _)) =
match lb_aux with
- | LB_val_implicit (pat, exp) -> separate space [ocaml_pat ctx pat; equals; ocaml_atomic_exp ctx exp]
+ | LB_val (pat, exp) -> separate space [ocaml_pat ctx pat; equals; ocaml_atomic_exp ctx exp]
| _ -> failwith "Ocaml: Explicit letbind found"
and ocaml_pexps ctx = function
| [pexp] -> ocaml_pexp ctx pexp
@@ -287,10 +287,8 @@ let ocaml_typedef ctx (TD_aux (td_aux, _)) =
let get_externs (Defs defs) =
let extern_id (VS_aux (vs_aux, _)) =
match vs_aux with
- | VS_val_spec (typschm, id) -> []
- | VS_extern_no_rename (typschm, id) -> [(id, id)]
- | VS_extern_spec (typschm, id, name) -> [(id, mk_id name)]
- | VS_cast_spec (typschm, id) -> []
+ | VS_val_spec (typschm, id, None, _) -> []
+ | VS_val_spec (typschm, id, Some ext, _) -> [(id, mk_id ext)]
in
let rec extern_ids = function
| DEF_spec vs :: defs -> extern_id vs :: extern_ids defs