summaryrefslogtreecommitdiff
path: root/lib/Camlcoq.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Camlcoq.ml')
-rw-r--r--lib/Camlcoq.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Camlcoq.ml b/lib/Camlcoq.ml
index d99e20f..e057771 100644
--- a/lib/Camlcoq.ml
+++ b/lib/Camlcoq.ml
@@ -252,6 +252,11 @@ let camlstring_of_coqstring (s: char list) =
| c :: s -> r.[pos] <- c; fill (pos + 1) s
in fill 0 s
+let coqstring_of_camlstring s =
+ let rec cstring accu pos =
+ if pos < 0 then accu else cstring (s.[pos] :: accu) (pos - 1)
+ in cstring [] (String.length s - 1)
+
(* Floats *)
let coqfloat_of_camlfloat f =