summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSon Ho2022-02-03 23:18:00 +0100
committerSon Ho2022-02-03 23:18:00 +0100
commitf7f5d626745200df5748e7bda860c7d303bea18a (patch)
tree1865b1e72ee781134f39401204422756ad883513 /src
parent72edb3fc4fdfa588d0cebe7fec27101da27ff1be (diff)
Make mor modifications
Diffstat (limited to '')
-rw-r--r--src/ExtractToFStar.ml11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ExtractToFStar.ml b/src/ExtractToFStar.ml
index d1e1176c..0781a811 100644
--- a/src/ExtractToFStar.ml
+++ b/src/ExtractToFStar.ml
@@ -310,7 +310,11 @@ let rec extract_ty (ctx : extraction_ctx) (fmt : F.formatter) (inside : bool)
if tys = [] then F.pp_print_string fmt "unit"
else (
F.pp_print_string fmt "(";
- Collections.List.iter_link (F.pp_print_space fmt)
+ Collections.List.iter_link
+ (fun () ->
+ F.pp_print_space fmt ();
+ F.pp_print_string fmt "&";
+ F.pp_print_space fmt ())
(extract_ty ctx fmt true) tys;
F.pp_print_string fmt ")")
| AdtId _ | Assumed _ ->
@@ -956,6 +960,11 @@ let extract_fun_def (ctx : extraction_ctx) (fmt : F.formatter)
ctx)
ctx def.inputs_lvs
in
+ (* Print the return type *)
+ F.pp_print_space fmt ();
+ F.pp_print_string fmt ":";
+ F.pp_print_space fmt ();
+ extract_ty ctx fmt false (Collections.List.to_cons_nil def.signature.outputs);
(* Print the "=" *)
F.pp_print_space fmt ();
F.pp_print_string fmt "=";