I am using ocamlformat built from 2c8d454.
This program ...
let _ =
try_with (fun () ->
match get () with
| None -> do_something ()
| Some _ -> () (* do nothing *))
;;
... gets rewritten to this.
let _ =
try_with (fun () ->
(* do nothing *)
match get () with
| None -> do_something ()
| Some _ -> ())
;;
This program ...
let _ =
try_with (fun () ->
a;
b (* after a *))
;;
... gets rewritten to this.
let _ =
try_with (fun () ->
(* after a *)
a;
b)
;;
In both cases the comment becomes nonsensical.