module Pretty_printer:sig..end
Pretty_printer has a string list ref with the names of pp functions matching the
interface:
val pp : Format.formatter -> t -> unit
The names are actually OCaml identifier names, e.g. "Core.Date.pp". Code for building
toplevels (this code is not in Core) evaluates the strings to yield the pretty
printers and register them with OCaml runtime.
val all : unit -> string listall () returns all pretty printers that have been registered.val register : string -> unitregister name adds name to the list of pretty printers.module type S =sig..end
S.
module Register:functor (M:sigtypetval module_name :stringval to_string :t -> stringend) ->Swith type t := M.t
Register builds a pp function from a to_string function, and adds the
module_name ^ ".pp" to the list of pretty printers.
module Register_pp:
Register_pp is like Register, but allows a custom pp function rather than using
to_string.