[pp] print html-friendly option types

Summary: Spent some time staring at empty HTML output instead of seeing `<Some ...>` because I'm dumb. Now it's dumb proof.

Reviewed By: mbouaziz

Differential Revision: D14258492

fbshipit-source-id: d1368d212
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 0578064a7f
commit 47e2c68b7c

@ -128,9 +128,9 @@ let elapsed_time fmt () = Mtime.Span.pp fmt (Mtime_clock.elapsed ())
let option pp fmt = function
| None ->
F.pp_print_string fmt "<None>"
F.pp_print_string fmt "[None]"
| Some x ->
F.fprintf fmt "<Some %a>" pp x
F.fprintf fmt "[Some %a]" pp x
let to_string ~f fmt x = F.pp_print_string fmt (f x)

Loading…
Cancel
Save