Printable.MakeImplement Printable interface from the minimum implementation.
Takes a module T, that provides a function pp : t printer and a module_name, and implements the rest of the Printable interface.
module M : sig ... endval to_string : M.t -> stringto_string x returns a human-readable representation of x
val str : unit -> M.t -> stringstr () t is formatted output function that matches "%a" conversion format specifier in functions, that prints to string, e.g., sprintf, failwithf, errorf and, surprisingly all Lwt printing function, including Lwt_io.printf and logging (or any other function with type ('a,unit,string,...) formatN`. Example:
Or_error.errorf "type %a is not valid for %a"
Type.str ty Exp.str expval pps : unit -> M.t -> stringsynonym for str
val ppo : Core_kernel.Out_channel.t -> M.t -> unitwill print to a standard output_channel, useful for using in printf, fprintf, etc.
val pp_seq : Stdlib.Format.formatter -> M.t Core_kernel.Sequence.t -> unitprints a sequence of values of type t