Style suggestion: Don't treat `not` as a special case.
Current formatting (tested with version 0.27.0) treats the not operation differently from other unary functions in some contexts:
let foo () = bax (bay ()) && baz ()
let foo () = (not (bay ())) && baz ()
What I'd prefer is to not treat not as a special case:
let foo () = bax (bay ()) && baz ()
let foo () = not (bay ()) && baz ()
I just don't find this more difficult to read.
To me the extra parentheses in (not x) && y just appear noisy.
As a random user, I agree. ocamlformat's choice is highly unconventional, in that I have never seen anyone write such parens even once, nor any confusion resulting from the lack of parens.
I think the special handling was requested by @mshinwell at some point
see https://github.com/ocaml-ppx/ocamlformat/issues/266#issuecomment-409892953
and some discussion in https://github.com/ocaml-ppx/ocamlformat/pull/686
In the mentioned discussions, I see: one request with no reasoning from mshinwell, and jberdine saying not a && b is confusing without parens, which is not at all in line with my experience, as I indicated above.
I do think the conventional profile should drop these parens.