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

Lambda argument splits in awkward way #1164

Closed
3 tasks
reinux opened this issue Sep 26, 2020 · 2 comments · Fixed by #1168
Closed
3 tasks

Lambda argument splits in awkward way #1164

reinux opened this issue Sep 26, 2020 · 2 comments · Fixed by #1168

Comments

@reinux
Copy link

reinux commented Sep 26, 2020

Issue created from fantomas-online

Code

let init =
  addDateTimeConverter
    (fun dt -> Date(dt.Year, dt.Month, dt.Day))
    (fun (Date (y, m, d)) ->
      System.DateTime(y, m, d))

Result

let init =
    addDateTimeConverter (fun dt -> Date(dt.Year, dt.Month, dt.Day)) (fun (Date (y,
                                                                                 m,
                                                                                 d)) ->
        System.DateTime(y, m, d))

Problem description

I'm not too sure what the condition would be to make this work right. Maybe when there are multiple curried arguments and the lines can be split more cleanly between them than by having them all on one line?

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 09/25/2020 16:37:27 - 27af638

    { config with
                MaxLineLength = 85 }
@reinux
Copy link
Author

reinux commented Sep 26, 2020

That was mega quick. Thanks as always!

@nojaf
Copy link
Contributor

nojaf commented Sep 26, 2020

Well, it helps that code changes required for this were minimal 😉.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants