Index of values

(++) [Fmt]

( ++ ) is Fmt.append.

A
addresses [Fmt]

addresses pp formats sequences by applying pp to consecutive subsequences of length w (defaults to 16).

always [Fmt]
any [Fmt]

any fmt ppf v formats any value with the constant format fmt.

append [Fmt]

append pp_v0 pp_v1 ppf v is pp_v0 ppf v; pp_v1 ppf v.

array [Fmt.Dump]

array pp_v formats an OCaml array using pp_v for the array elements.

array [Fmt]

array sep pp_v formats array elements.

ascii [Fmt]

ascii ~w ~subst () formats character sequences by printing characters in the printable US-ASCII range ([0x20];[0x7E]) as is, and replacing the rest with subst (defaults to fmt ".").

B
bi_byte_size [Fmt]

bi_byte_size formats a byte size according to its magnitude using binary prefixes up to pebi bytes (215).

bool [Fmt]

bool is Format.pp_print_bool.

box [Fmt]

box ~indent pp ppf wraps pp in a pretty-printing box.

braces [Fmt]

braces pp_v ppf is pf "@[<1>{%a}@]" pp_v.

brackets [Fmt]

brackets pp_v ppf is pf "@[<1>[%a]@]" pp_v.

buffer [Fmt]

buffer formats a Buffer.t value's current contents.

byte_size [Fmt]

byte_size is si_size ~scale:0 "B".

C
char [Fmt]

char is Format.pp_print_char.

comma [Fmt]

comma is Fmt.any ",@ ".

concat [Fmt]

concat ~sep pps formats a value using the formaters pps and separting each format with sep (defaults to Fmt.cut).

const [Fmt]

const pp_v v always formats v using pp_v.

cut [Fmt]

cut has the effect of Format.pp_print_cut.

D
did_you_mean [Fmt]

did_you_mean ~pre kind ~post pp_v formats a faulty value v of kind kind and a list of hints that v could have been mistaken for.

E
epr [Fmt]

epr is pf stderr.

error [Fmt]

error fmt ... is kstr (fun s -> Error s) fmt ...

error_msg [Fmt]

error_msg fmt ... is kstr (fun s -> Error (`Msg s)) fmt ...

exn [Fmt]

exn formats an exception.

exn_backtrace [Fmt]

exn_backtrace formats an exception backtrace.

F
failwith [Fmt]

failwith is kstr failwith, raises Stdlib.Failure with a pretty-printed string argument.

failwith_notrace [Fmt]

failwith_notrace is like Fmt.failwith but raises with raise_notrace.

field [Fmt.Dump]

field ~label l prj pp_v pretty prints a named field using label (defaults to styled `Yellow string) for the label, and using prj pp_v for the field value.

field [Fmt]

field ~label ~sep l prj pp_v pretty prints a labelled field value as pf "@[<1>%a%a%a@]" label l sep () (using prj pp_v).

float [Fmt]

float ppf is pf ppf "%g".

float_dfrac [Fmt]

float_dfrac d rounds the float to the dth decimal fractional digit and formats the result with "%g".

float_dsig [Fmt]

float_dsig d rounds the normalized decimal significand of the float to the dth decimal fractional digit and formats the result with "%g".

flush [Fmt]

flush has the effect of Format.pp_print_flush

fmt [Fmt]

fmt fmt ppf is pf ppf fmt.

H
hashtbl [Fmt.Dump]

hashtbl pp_k pp_v formats an unspecified representation of the bindings of a hash table using pp_k for the keys and pp_v for the values.

hashtbl [Fmt]

hashtbl ~sep pp_binding formats the bindings of a hash table.

hbox [Fmt]

hbox is like Fmt.box but is a horizontal box: the line is not split in this box (but may be in sub-boxes).

hex [Fmt]

hex ~w () formats character sequences as traditional hex dumps, matching the output of xxd and forcing line breaks after every w characters (defaults to 16).

hovbox [Fmt]

hovbox is a condensed Fmt.box.

hvbox [Fmt]

hvbox is like Fmt.hbox if it fits on a single line, or like Fmt.vbox otherwise.

I
id [Fmt]

id is Fun.id.

if_utf_8 [Fmt]

if_utf_8 pp_u pp ppf v is: pp_u ppf v if utf_8 ppf is true., pp ppf v otherwise.

int [Fmt]

int is pf ppf "%d".

int32 [Fmt]

int32 ppf is pf ppf "%ld".

int64 [Fmt]

int64 ppf is pf ppf "%Ld".

invalid_arg [Fmt]

invalid_arg is kstr invalid_arg, raises Stdlib.Invalid_argument with a pretty-printed string argument.

iter [Fmt.Dump]

iter iter pp_name pp_elt formats an unspecified representation of the iterations of iter over a value using pp_elt.

iter [Fmt]

iter ~sep iter pp_elt formats the iterations of iter over a value using pp_elt.

iter_bindings [Fmt.Dump]

iter_bindings ~sep iter pp_name pp_k pp_v formats an unspecified representation of the iterations of iter over a value using pp_k and pp_v.

iter_bindings [Fmt]

iter_bindings ~sep iter pp_binding formats the iterations of iter over a value using pp_binding.

K
kpf [Fmt]

kpf is Format.kfprintf.

kstr [Fmt]

kstr is like Fmt.str but continuation based.

kstrf [Fmt]
L
lines [Fmt]

lines formats lines by replacing newlines ('\n') in the string with calls to Format.pp_force_newline.

list [Fmt.Dump]

list pp_v formats an OCaml list using pp_v for the list elements.

list [Fmt]

list sep pp_v formats list elements.

N
nativeint [Fmt]

nativeint ppf is pf ppf "%nd".

nop [Fmt]

nop formats nothing.

O
octets [Fmt]

octets ~w ~sep () formats character sequences as hexadecimal digits.

of_to_string [Fmt]

of_to_string f ppf v is string ppf (f v).

on_bytes [Fmt]

on_bytes pp is pp adapted to format (entire) bytes.

on_string [Fmt]

on_string pp is pp adapted to format (entire) strings.

one_of [Fmt]

one_of ~empty pp_v ppf l formats according to the length of l 0, formats empty (defaults to Fmt.nop)., 1, formats the element with pp_v., 2, formats "either %a or %a" with the list elements, n, formats "one of %a, ... or %a" with the list elements

option [Fmt.Dump]

option pp_v formats an OCaml option using pp_v for the Some case.

option [Fmt]

option ~none pp_v formats an optional value.

P
pair [Fmt.Dump]

pair pp_fst pp_snd formats an OCaml pair using pp_fst and pp_snd for the first and second projection.

pair [Fmt]

pair ~sep pp_fst pp_snd formats a pair.

paragraphs [Fmt]

paragraphs formats paragraphs by suppressing initial and trailing spaces and newlines, replacing blank lines (a line made only of white space) by a two Format.pp_force_newline and remaining consecutive white space with a single Format.pp_print_space.

parens [Fmt]

parens pp_v ppf is pf "@[<1>(%a)@]" pp_v.

pf [Fmt]

pf is Format.fprintf.

pr [Fmt]

pr is pf stdout.

prefix [Fmt]
Q
queue [Fmt.Dump]

queue pp_v formats an unspecified representation of an OCaml queue using pp_v to format its elements, in least recently added order.

queue [Fmt]

queue ~sep pp_v formats queue elements.

quote [Fmt]

quote ~mark pp_v ppf is pf "@[<1>@<1>%s%a@<1>%s@]" mark pp_v mark, mark defaults to "\"", it is always counted as spanning as single column (this allows for UTF-8 encoded marks).

R
record [Fmt.Dump]

record fields pretty-prints a value using the concatenation of fields, separated by ";@,", framed in a vertical box and surrounded by Fmt.braces.

record [Fmt]

record ~sep fields pretty-prints a value using the concatenation of fields, separated by sep (defaults to cut) and framed in a vertical box.

result [Fmt.Dump]

result ~ok ~error formats an OCaml result using ok for the Ok case value and error for the Error case value.

result [Fmt]

result ~ok ~error formats a result value using ok for the Ok case and error for the Error case.

S
semi [Fmt]

semi is Fmt.any ";@ ".

seq [Fmt.Dump]

seq pp_v formats an OCaml sequence using pp_v for the sequence elements.

seq [Fmt]

seq sep pp_v formats sequence elements.

set_style_renderer [Fmt]

set_style_renderer ppf r sets the style renderer of ppf to r.

set_utf_8 [Fmt]

set_utf_8 ppf b enables or disables conditional UTF-8 formatting on ppf.

setup [Fmt_tty]

setup ?style_renderer ?utf_8 outc is a formatter for outc with Fmt.set_style_renderer and Fmt.set_utf_8 correctly setup.

setup_std_outputs [Fmt_tty]

setup_std_outputs ?style_renderer ?utf_8 () applies Fmt_tty.setup on stdout and stderr.

si_size [Fmt]

si_size ~scale unit formats a non negative integer representing unit unit at scale 10scale * 3, depending on its magnitude, using power of 3 SI prefixes (i.e.

signal [Fmt.Dump]

signal formats an OCaml signal number as a C POSIX constant or "SIG(%d)" the signal number is unknown.

sp [Fmt]

sp has the effect of Format.pp_print_space.

sps [Fmt]

sps n has the effect of Format.pp_print_break n 0.

stack [Fmt.Dump]

stack pp_v formats an unspecified representation of an OCaml stack using pp_v to format its elements in top to bottom order.

stack [Fmt]

stack ~sep pp_v formats stack elements.

stderr [Fmt]

stderr is the standard error formatter.

stdout [Fmt]

stdout is the standard output formatter.

str [Fmt]

str is Format.asprintf.

str_like [Fmt]

str_like ppf is like Fmt.str except its Fmt.utf_8 and Fmt.style_renderer settings are those of ppf.

strf [Fmt]
strf_like [Fmt]
string [Fmt.Dump]

string is pf ppf "%S".

string [Fmt]

string is Format.pp_print_string.

style_renderer [Fmt_cli]

style_renderer ?env ?docs () is a Cmdliner option --color that can be directly used with the optional arguments of TTY setup or to control style rendering.

style_renderer [Fmt]

style_renderer ppf is the style renderer used by ppf.

styled [Fmt]

styled s pp formats like pp but styled with s.

styled_unit [Fmt]
suffix [Fmt]
T
text [Fmt]

text formats text by respectively replacing spaces and newlines in the string with Format.pp_print_space and Format.pp_force_newline.

text_loc [Fmt]

text_loc formats a line-column text range according to GNU conventions.

to_to_string [Fmt]

to_to_string pp_v v is strf "%a" pp_v v.

truncated [Fmt]

truncated ~max formats a string using at most max characters.

U
uchar [Fmt.Dump]

uchar formats an OCaml Uchar.t value using only US-ASCII encoded characters according to the Unicode notational convention for code points.

uint [Fmt]

uint ppf is pf ppf "%u".

uint32 [Fmt]

uint32 ppf is pf ppf "%lu".

uint64 [Fmt]

uint64 ppf is pf ppf "%Lu".

uint64_ns_span [Fmt]

uint64_ns_span formats an unsigned nanosecond time span according to its magnitude using SI prefixes on seconds and accepted non-SI units.

unativeint [Fmt]

unativeint ppf is pf ppf "%nu".

unit [Fmt]
using [Fmt]

using f pp ppf v ppf ppf (f v).

utf_8 [Fmt]

utf_8 ppf is true if UTF-8 output is enabled on ppf.

V
vbox [Fmt]

vbox is like Fmt.box but is a vertical box: every break hint leads to a new line which adds indent to the current indentation (defaults to 0).

W
with_buffer [Fmt]

with_buffer ~like b is a formatter whose Fmt.utf_8 and Fmt.style_renderer settings are copied from those of like (if provided).

words [Fmt]

words formats words by suppressing initial and trailing white space and replacing consecutive white space with a single Format.pp_print_space.