this repo has no description
1#if OCAML_VERSION >= (5, 0, 0)
2module Format = struct
3 include Format
4
5 type formatter_tag_functions = {
6 mark_open_tag : tag -> string;
7 mark_close_tag : tag -> string;
8 print_open_tag : tag -> unit;
9 print_close_tag : tag -> unit;
10 }
11
12 let pp_set_formatter_tag_functions formatter fns =
13 let {mark_open_tag = mot; mark_close_tag = mct;
14 print_open_tag = pot; print_close_tag = pct} = fns in
15 let wrap f v = function String_tag s -> f s | _ -> v in
16 let stag_fns = {
17 mark_open_stag = wrap mot "";
18 mark_close_stag = wrap mct "";
19 print_open_stag = wrap pot ();
20 print_close_stag = wrap pct ()
21 } in
22 Format.pp_set_formatter_stag_functions formatter stag_fns
23end
24#endif