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

Ormolu forcing long lines in function definitions #609

Closed
sellout opened this issue Jun 9, 2020 · 1 comment · Fixed by #610
Closed

Ormolu forcing long lines in function definitions #609

sellout opened this issue Jun 9, 2020 · 1 comment · Fixed by #610
Labels
bug Something isn't working

Comments

@sellout
Copy link
Contributor

sellout commented Jun 9, 2020

Describe the bug
In a function definition,

foo bar =
  body

foo bar = is beyond our auto-enforced line length, but Ormolu doesn't let me break it, AFAICT. Every variant I try has Ormolu suggesting foo bar = on a single line.

To Reproduce
Define a function with a single argument, and try to get it to not put everything on one line.

Expected behavior
There should be some way to separate these tokens. My suggestion would be something like

foo
  bar
  = body

I.e., treat = more like an operator.

Environment

  • OS name + version: NixOS 20.03
  • Version of the code: 0.3.1
@mrkkrp mrkkrp added the bug Something isn't working label Jun 9, 2020
@sellout
Copy link
Contributor Author

sellout commented Jun 9, 2020

I guess the more obvious formatting would be to match the same behavior on multi-param functions ...

foo
  bar =
    body

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants