aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.ml44
-rw-r--r--lib/pp.mli2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/pp.ml4 b/lib/pp.ml4
index 854e4b49ca..c602b403e0 100644
--- a/lib/pp.ml4
+++ b/lib/pp.ml4
@@ -332,3 +332,7 @@ let msgnl x = msgnl_with !std_ft x
let msgerr x = msg_with !err_ft x
let msgerrnl x = msgnl_with !err_ft x
let msg_warning x = msg_warning_with !err_ft x
+
+let string_of_ppcmds c =
+ msg_with Format.str_formatter c;
+ Format.flush_str_formatter ()
diff --git a/lib/pp.mli b/lib/pp.mli
index 44732c7efb..7070e3f5f4 100644
--- a/lib/pp.mli
+++ b/lib/pp.mli
@@ -112,3 +112,5 @@ val msgnl : std_ppcmds -> unit
val msgerr : std_ppcmds -> unit
val msgerrnl : std_ppcmds -> unit
val msg_warning : std_ppcmds -> unit
+
+val string_of_ppcmds : std_ppcmds -> string