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

Type parameters (type t) do not seem to care about multi-line #814

Open
Niols opened this issue Dec 29, 2024 · 0 comments
Open

Type parameters (type t) do not seem to care about multi-line #814

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

Comments

@Niols
Copy link
Member

Niols commented Dec 29, 2024

As of f35eee4, Topiary formats:

let foo
    (type t)
    (x : t)
    : t
  =
  result

as:

let foo (type t)
    (x : t)
    : t
  =
  result

Note how (type t) goes on the same line as the binding, which does not seem to fit the rest of Topiary's formatting. I would expect the formatting to be unchanged.

To reproduce:

$ nix run github:tweag/topiary/f35eee4 -- format -l ocaml <<EOF
let foo
    (type t)
    (x : t)
    : t
  =
  result
EOF
@Niols Niols added P3 minor: not priorized type: bug language: ocaml OCaml formatting issues labels Dec 29, 2024
@Niols Niols changed the title Type parameters do not seem to care about multi-line Type parameters (type t) do not seem to care about multi-line Dec 29, 2024
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