diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Camlcoq.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml index 68c095f0..5eb52e88 100644 --- a/lib/Camlcoq.ml +++ b/lib/Camlcoq.ml @@ -284,6 +284,7 @@ let coqint_of_camlint64 : int64 -> Integers.Int64.int = Z.of_uint64 type atom = positive let atom_of_string = (Hashtbl.create 17 : (string, atom) Hashtbl.t) +let atom_of_stamp = (Hashtbl.create 17: (int, atom) Hashtbl.t) let string_of_atom = (Hashtbl.create 17 : (atom, string) Hashtbl.t) let next_atom = ref Coq_xH @@ -297,6 +298,12 @@ let intern_string s = Hashtbl.add string_of_atom a s; a +let add_stamp s a = + Hashtbl.add atom_of_stamp s a + +let stamp_atom s = + Hashtbl.find atom_of_stamp s + let extern_atom a = try Hashtbl.find string_of_atom a |