summaryrefslogtreecommitdiff
path: root/src/Translate.ml
diff options
context:
space:
mode:
authorSidney Congard2022-08-08 15:16:14 +0200
committerSidney Congard2022-08-08 15:16:14 +0200
commit3c5fb260012ee8bb8b9fd90bc4624d893ac7678a (patch)
tree6702e5d4b3b01aa1a96da150dd17ca6f4dfce326 /src/Translate.ml
parentf9015d1e956ace6c875eb6a631caeac49cfb8148 (diff)
Register global names, one error remaining
Diffstat (limited to '')
-rw-r--r--src/Translate.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Translate.ml b/src/Translate.ml
index a936d626..fdd6d05f 100644
--- a/src/Translate.ml
+++ b/src/Translate.ml
@@ -655,7 +655,7 @@ let translate_module (filename : string) (dest_dir : string) (config : config)
m.declarations))
in
- (* Register unique names for all the top-level types and functions.
+ (* Register unique names for all the top-level types, functions and globals.
* Note that the order in which we generate the names doesn't matter:
* we just need to generate a mapping from identifier to name, and make
* sure there are no name clashes. *)
@@ -677,6 +677,10 @@ let translate_module (filename : string) (dest_dir : string) (config : config)
ctx trans_funs
in
+ let ctx = List.fold_left
+ ExtractToFStar.extract_global_decl_register_names ctx m.globals
+ in
+
(* Open the output file *)
(* First compute the filename by replacing the extension and converting the
* case (rust module names are snake case) *)