Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:: ignores single- vs multi-line #658

Open
Niols opened this issue Dec 1, 2023 · 0 comments
Open

:: ignores single- vs multi-line #658

Niols opened this issue Dec 1, 2023 · 0 comments
Labels
language: ocaml OCaml formatting issues P3 minor: not priorized type: bug

Comments

@Niols
Copy link
Member

Niols commented Dec 1, 2023

As of 8cc9aa4, Topiary formats:

let () = a :: b
    :: c

as:

let () =
  a :: b :: c

which takes into account the multi-line mode for let but not for ::. I would expect it to be multi-line, eg:

let () =
  a ::
    b ::
    c

or

let () =
  a
    :: b
    :: c

Related to #657 for uniformity of the handling of operators.

To reproduce:

$ nix run github:tweag/topiary/8cc9aa40d -- format -l ocaml <<EOF
let () = a :: b
    :: c
EOF
@Niols Niols added P3 minor: not priorized type: bug language: ocaml OCaml formatting issues labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: ocaml OCaml formatting issues P3 minor: not priorized type: bug
Projects
None yet
Development

No branches or pull requests

1 participant