mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
feat(fmt): add exn combinator
This commit is contained in:
parent
d12213da31
commit
fb6483539e
2 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue