Module Tpf_fmt
Generic printers.
This modules depends on fmt
.
Generic printer
type sum
= string -> unit Fmt.t list Fmt.t
sum name args
formats a variant with constructorname
and argument formattersargs
.
type record
= string option -> (string * unit Fmt.t) list Fmt.t
record None fields
formats a plain constructorless record;record (Some name) fields
formats an inline record with constructorname
.args
are argument formatters paired with field names.
data
interface
val data0 : ?sum:sum -> ?record:record -> 'a Tpf.data0 -> 'a Fmt.t
val data1 : ?sum:sum -> ?record:record -> ('a, 'b) Tpf.data1 -> 'a Fmt.t -> 'b Fmt.t
val data2 : ?sum:sum -> ?record:record -> ('a, 'b, 'c) Tpf.data2 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t
val data3 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd) Tpf.data3 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t
val data4 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e) Tpf.data4 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t
val data5 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e, 'f) Tpf.data5 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t -> 'f Fmt.t
val data6 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e, 'f, 'g) Tpf.data6 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t -> 'f Fmt.t -> 'g Fmt.t
val data7 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h) Tpf.data7 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t -> 'f Fmt.t -> 'g Fmt.t -> 'h Fmt.t
val data8 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i) Tpf.data8 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t -> 'f Fmt.t -> 'g Fmt.t -> 'h Fmt.t -> 'i Fmt.t
val data9 : ?sum:sum -> ?record:record -> ('a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j) Tpf.data9 -> 'a Fmt.t -> 'b Fmt.t -> 'c Fmt.t -> 'd Fmt.t -> 'e Fmt.t -> 'f Fmt.t -> 'g Fmt.t -> 'h Fmt.t -> 'i Fmt.t -> 'j Fmt.t