client config: improve printer

This commit is contained in:
Simon Cruanes 2025-12-07 22:11:54 -05:00
parent b429336740
commit 5daef6873b
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -13,9 +13,15 @@ type t = {
} }
let pp out (self : t) : unit = let pp out (self : t) : unit =
let ppiopt = Format.pp_print_option Format.pp_print_int in let ppiopt out i =
match i with
| None -> Format.fprintf out "None"
| Some i -> Format.fprintf out "%d" i
in
let pp_header ppf (a, b) = Format.fprintf ppf "@[%s: @,%s@]@." a b in let pp_header ppf (a, b) = Format.fprintf ppf "@[%s: @,%s@]@." a b in
let ppheaders = Format.pp_print_list pp_header in let ppheaders out l =
Format.fprintf out "[@[%a@]]" (Format.pp_print_list pp_header) l
in
let { let {
debug; debug;
self_trace; self_trace;