feat(fmt): add exn combinator

This commit is contained in:
Simon Cruanes 2020-03-07 11:26:00 -06:00
parent d12213da31
commit fb6483539e
2 changed files with 6 additions and 0 deletions

View file

@ -127,6 +127,8 @@ let hbox pp out x =
let of_to_string f out x = Format.pp_print_string out (f x)
let exn = of_to_string Printexc.to_string
let const pp x out () = pp out x
let some pp out = function

View file

@ -29,6 +29,10 @@ val bool : bool printer
val float3 : float printer (* 3 digits after . *)
val float : float printer
val exn : exn printer
(** Printer using {!Printexc.to_string}.
@since NEXT_RELEASE *)
val newline : unit printer
(** Force newline (see {!Format.pp_force_newline}).
@since 1.2 *)