You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fantomas was able to format the code but the result appears to be invalid F# code.
Please openan issue.
Formatted result:letprivatefn(xs:int [])=
fn2
""[letr= Seq.head xs
yield r
lets= fn2 ()
s.DoSomething()]
Problem description
If you have an Elmish like syntax that uses yields interspersed with lets everything after the first let is not indented correctly yielding broken code.
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.
As in the other issue, I am unfamiliar with the Fantomas code, but would be willing to try with some direction.
Interesting, the SynExpr.LetOrUse expression inside the list should be printed with the atCurrentColumn helper function at first glance.
To have an idea how Fantomas works you can watch some videos on YouTube.
As for this case, I would start with a failing unit test in ListTests.fs and try and find in the CodePrinter.fs where the SynExpr.LetOrUse inside the list is printed.
You can do this exploring as part of draft PR and I can guide you along the way from there if you want.
Issue created from fantomas-online
Code
Error
Problem description
If you have an Elmish like syntax that uses yields interspersed with lets everything after the first let is not indented correctly yielding broken code.
Extra information
As in the other issue, I am unfamiliar with the Fantomas code, but would be willing to try with some direction.
Options
Fantomas Master at 10/02/2020 17:06:53 - 31305c2
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: