From 97abfe600eef33af393cc1e64f8edbb6dc0d0b84 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 14 Mar 2017 11:16:11 +0100 Subject: [PATCH] use boxes in `CCFormat.Dump` for tuples --- src/core/CCFormat.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/CCFormat.ml b/src/core/CCFormat.ml index 03e68bb1..97590cf6 100644 --- a/src/core/CCFormat.ml +++ b/src/core/CCFormat.ml @@ -384,12 +384,12 @@ module Dump = struct let option pp out x = match x with | None -> Format.pp_print_string out "None" | Some x -> Format.fprintf out "Some %a" pp x - let pair p1 p2 = within "(" ")" (pair p1 p2) - let triple p1 p2 p3 = within "(" ")" (triple p1 p2 p3) - let quad p1 p2 p3 p4 = within "(" ")" (quad p1 p2 p3 p4) + let pair p1 p2 = within "(" ")" (hovbox (pair p1 p2)) + let triple p1 p2 p3 = within "(" ")" (hovbox (triple p1 p2 p3)) + let quad p1 p2 p3 p4 = within "(" ")" (hovbox (quad p1 p2 p3 p4)) let result' pok perror out = function - | Result.Ok x -> Format.fprintf out "(Ok %a)" pok x - | Result.Error e -> Format.fprintf out "(Error %a)" perror e + | Result.Ok x -> Format.fprintf out "(@[Ok %a@])" pok x + | Result.Error e -> Format.fprintf out "(@[Error %a@])" perror e let result pok = result' pok string let to_string = to_string end