Prettymodule Types : sig ... endinclude module type of Typestype delayed = unit formattingval print : Stdlib.Format.formatter -> 'a procval out : 'a procval error : 'a procval sink : 'a procval to_string : ('a, string) funcval string_to : (string -> 'b) -> ('a, 'b) funcval failwith : ('a, 'b) funcval invalid_arg : ('a, 'b) funcval failure : exn printerval char : char printerval string : string printerval text : string printerval int64 : int64 printerval path : string list printerwith_oxford_comma ~comb pp ppf lst pretty-prints lst using ppf by enumerating its items and inserting Oxford-style comma. In particular, this function:
pp ppf e if lst = [e];a comb b" (without comma) in case lst = [a;b];comb", as for instance in "a, b, c, and d".comb is "and" by default; other sensible use is "or".
val record_with_conditional_fields :
?opening:'a printer ->
?closing:'a printer ->
'a conditional_field list ->
'a printermodule Simple : sig ... endInitialization of standard formatters; calls Fmt_tty.setup_std_outputs, and, depending on the kind of terminals they are bound to, adapts the margins of Fmt.stdout and Fmt.stderr. Their styles at that point are the ones set_colors restores with auto.
set_colors spec sets whether Fmt.stdout and Fmt.stderr output colors (and other styles), according to spec: a comma-separated list of items WHEN or STREAM:WHEN, where STREAM is stdout or stderr, and WHEN is always, never or auto (as decided by init_formatters, from the kind of terminal they are bound to). An item without STREAM applies to both, and later items take precedence.
colors_spec () is a specification for set_colors that gives the same styles as Fmt.stdout and Fmt.stderr currently output, e.g. "stdout:never,stderr:always".
set_margins spec sets the margins (and maximum indentations) of Fmt.stdout and Fmt.stderr, according to spec: a comma-separated list of items GEOMETRY or STREAM:GEOMETRY, where STREAM is stdout or stderr, and GEOMETRY is MARGIN/MAX_INDENT or MARGIN (for a maximum indentation of MARGIN - 1), as accepted by Format.pp_set_geometry. An item without STREAM applies to both, and later items take precedence.
margins_spec () is a specification for set_margins that gives the current margins (and maximum indentations) of Fmt.stdout and Fmt.stderr, e.g. "stdout:78/68,stderr:180/179".