summaryrefslogtreecommitdiff
path: root/compiler/Print.ml
diff options
context:
space:
mode:
authorSon Ho2024-03-08 19:33:08 +0100
committerSon Ho2024-03-08 19:33:08 +0100
commitcd99485fa2493697b2b3775a5cae80bf9bf58a99 (patch)
tree9034141b3dc421c1033b240fedb6f832011d1c8e /compiler/Print.ml
parenteb9844a06f3da5ffec989d9e42cc7776d0c026db (diff)
Make progress on fixing the loops
Diffstat (limited to 'compiler/Print.ml')
-rw-r--r--compiler/Print.ml4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/Print.ml b/compiler/Print.ml
index 8658a7d5..0c69bd05 100644
--- a/compiler/Print.ml
+++ b/compiler/Print.ml
@@ -16,6 +16,10 @@ module Expressions = Charon.PrintExpressions
let list_to_string (to_string : 'a -> string) (ls : 'a list) : string =
"[" ^ String.concat "; " (List.map to_string ls) ^ "]"
+let pair_to_string (to_string0 : 'a -> string) (to_string1 : 'b -> string)
+ ((x, y) : 'a * 'b) : string =
+ "(" ^ to_string0 x ^ ", " ^ to_string1 y ^ ")"
+
let bool_to_string (b : bool) : string = if b then "true" else "false"
(** Pretty-printing for values *)