ocamlformat
ocamlformat copied to clipboard
Style suggestion: style ppx-extended function declarations like regular function declarations
Current formatting
let _ =
my_func ~hello ~world
~f:
(fun%my_ppx x ->
let x = 1 + 2 in
x)
This formatting is similar for function%my_ppx as well.
Describe the formatting you'd like Ideally indentation would match what the fun declaration would look like without the %my_ppx, which in the default profile looks like this:
let _ =
my_func ~hello ~world ~f:(fun x ->
let x = 1 + 2 in
x)
Additional context I guess the fact that these are formatted differently almost feels like a bug? Not sure why any user would want unique behavior for these kinds of function declarations, but maybe I don't know how ppxes are being used here