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

Empty let moves comments #917

Closed
brandonchinn178 opened this issue Aug 14, 2022 · 0 comments · Fixed by #962
Closed

Empty let moves comments #917

brandonchinn178 opened this issue Aug 14, 2022 · 0 comments · Fixed by #962
Assignees
Labels
bug Something isn't working comments Issues related to comment placement

Comments

@brandonchinn178
Copy link
Collaborator

Describe the bug
let is allowed to have no bindings, but this causes any comments later in the file to be moved into the let

To Reproduce

foo =
  let
   in 10

-- a comment
bar = 20

gets reformatted to

foo =
  let -- a comment

   in 10

bar = 20

Expected behavior
Should not change

Environment

  • OS name + version:
  • Version of the code: ormolu-live.tweag.io

Additional context
Add any other context about the problem here.

@mrkkrp mrkkrp added comments Issues related to comment placement bug Something isn't working labels Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comments Issues related to comment placement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants