diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.ml | 2 | ||||
-rw-r--r-- | lib/util.mli | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index 599e17adf..dc25caefe 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -813,6 +813,8 @@ let prvect_with_sep sep elem v = let n = Array.length v in if n = 0 then mt () else pr (n - 1) +let surround p = hov 1 (str"(" ++ p ++ str")") + (*s Size of ocaml values. *) module Size = struct diff --git a/lib/util.mli b/lib/util.mli index a5089a2de..9951aa1c5 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -240,6 +240,8 @@ val prlist_with_sep : val prvect_with_sep : (unit -> std_ppcmds) -> ('b -> std_ppcmds) -> 'b array -> std_ppcmds val pr_vertical_list : ('b -> std_ppcmds) -> 'b list -> std_ppcmds +val surround : std_ppcmds -> std_ppcmds + (*s Size of an ocaml value (in words, bytes and kilobytes). *) |