opam-file-format icon indicating copy to clipboard operation
opam-file-format copied to clipboard

OpamPrinter.format_value does not handle precedence

Open emillon opened this issue 1 year ago • 0 comments

Hi, When passed to OpamPrinter.format_value, the expression (a | b) & c is printed as a | b & c, which is equivalent to a | (b & c). The function does not seem to have any way of printing parentheses (but the corresponding function in opam-format seems to work). See ocaml/dune#3431. Thanks!

emillon avatar Mar 16 '23 14:03 emillon