From 164d71380a7a966058eeb1287beeb12897e97b18 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 7 Oct 2015 16:28:22 +0200 Subject: [PATCH] small bugfix in `CCSexpM.print` --- src/sexp/CCSexpM.ml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sexp/CCSexpM.ml b/src/sexp/CCSexpM.ml index 1fa12bef..b2fa12eb 100644 --- a/src/sexp/CCSexpM.ml +++ b/src/sexp/CCSexpM.ml @@ -93,13 +93,11 @@ let rec print fmt t = match t with | `List [] -> Format.pp_print_string fmt "()" | `List [x] -> Format.fprintf fmt "@[(%a)@]" print x | `List l -> - Format.open_hovbox 2; - Format.pp_print_char fmt '('; + Format.fprintf fmt "@[("; List.iteri (fun i t' -> (if i > 0 then Format.fprintf fmt "@ "; print fmt t')) l; - Format.pp_print_char fmt ')'; - Format.close_box () + Format.fprintf fmt ")@]" let rec print_noindent fmt t = match t with | `Atom s when _must_escape s -> Format.fprintf fmt "\"%s\"" (String.escaped s)