fix CCFormat.seq combinator

This commit is contained in:
Simon Cruanes 2015-02-02 15:28:18 +01:00
parent 21c90a209d
commit ceca7b6343

View file

@ -82,7 +82,10 @@ let seq ?(start="[") ?(stop="]") ?(sep=", ") pp fmt seq =
Format.pp_print_string fmt start; Format.pp_print_string fmt start;
let first = ref true in let first = ref true in
seq (fun x -> seq (fun x ->
(if !first then first := false else Format.pp_print_string fmt sep); (if !first then first := false else (
Format.pp_print_string fmt sep;
Format.pp_print_cut fmt ();
));
pp fmt x); pp fmt x);
Format.pp_print_string fmt stop Format.pp_print_string fmt stop