module Dum:This module dumps arbitrary OCaml values into a human-readable format and always terminates.sig..end
Dum was derived from both the Size module and from the Std.dump function of Extlib formerly known as Dumper.
The output format is not formally defined and is meant only to be inspected by humans. The basic conventions (subject to change) are the following:
(...) delimit blocks such as tuples or anything equivalent.[...] delimit a chain of blocks that is compatible
with the structure of a finite list, i.e. [ 1 2 3 ] is the same as
(1 (2 (3 0))).<...> delimit something that is not shown in depth
for some reason.# followed by a number denotes a reference to a shared
value, e.g. #0: (1 (2 #0)) can be obtained with
let rec l = 1 :: 2 :: l in Dum.p l.[|...|] is reserved to unboxed
arrays of floats.val default_lim : int Pervasives.refval default_show_lazy : bool Pervasives.refWarning: this relies on unofficially documented material of the standard distribution (file lazy.ml) and lazy values altogether are an experimental feature of OCaml.
This functionality may disappear in the future.
val to_eformat : ?show_lazy:bool -> ?lim:int -> 'a -> Easy_format.tval to_string : ?show_lazy:bool -> ?lim:int -> 'a -> stringval p : ?show_lazy:bool -> ?lim:int -> 'a -> stringDum.to_string and Dum.p are equivalent.val to_stdout : ?show_lazy:bool -> ?lim:int -> 'a -> unitstdout.val to_stderr : ?show_lazy:bool -> ?lim:int -> 'a -> unitstderr.val to_channel : ?show_lazy:bool -> ?lim:int -> Pervasives.out_channel -> 'a -> unitout_channelval to_formatter : ?show_lazy:bool -> ?lim:int -> Format.formatter -> 'a -> unitval to_buffer : ?show_lazy:bool -> ?lim:int -> Buffer.t -> 'a -> unit