Module Fmt.Dump
Formatters for inspecting OCaml values.
Formatters of this module dump OCaml value with little control over the representation but with good default box structures and, whenever possible, using OCaml syntax.
Base types formatters
val signal : int tsignalformats an OCaml signal number as a C POSIX constant or"SIG(%d)"the signal number is unknown.
val uchar : Stdlib.Uchar.t tucharformats an OCamlUchar.t value using only US-ASCII encoded characters according to the Unicode notational convention for code points.
Polymorphic type formatters
val pair : 'a t -> 'b t -> ('a * 'b) tpair pp_fst pp_sndformats an OCaml pair usingpp_fstandpp_sndfor the first and second projection.
val option : 'a t -> 'a option toption pp_vformats an OCaml option usingpp_vfor theSomecase. No parentheses are added.
val result : ok:'a t -> error:'b t -> ('a, 'b) Result.result tresult ~ok ~errorformats an OCaml result usingokfor theOkcase value anderrorfor theErrorcase value. No parentheses are added.
val hashtbl : 'a t -> 'b t -> ('a, 'b) Stdlib.Hashtbl.t thashtbl pp_k pp_vformats an unspecified representation of the bindings of a hash table usingpp_kfor the keys andpp_vfor the values. If the hash table has multiple bindings for a given key, all bindings are formatted, with the most recent binding first.
val queue : 'a t -> 'a Stdlib.Queue.t tqueue pp_vformats an unspecified representation of an OCaml queue usingpp_vto format its elements, in least recently added order.
val stack : 'a t -> 'a Stdlib.Stack.t tstack pp_vformats an unspecified representation of an OCaml stack usingpp_vto format its elements in top to bottom order.