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

Latest fantomas breaks Falanx indentation #384

Closed
7sharp9 opened this issue Dec 11, 2018 · 2 comments · Fixed by #393
Closed

Latest fantomas breaks Falanx indentation #384

7sharp9 opened this issue Dec 11, 2018 · 2 comments · Fixed by #393

Comments

@7sharp9
Copy link
Member

7sharp9 commented Dec 11, 2018

Description

The latest 2.9.1 has incorrect indentation

Repro code

See jet/falanx#84

@nojaf
Copy link
Contributor

nojaf commented Jan 16, 2019

Hi @7sharp9, could you give us some more pointers how to solve this.
The F# code in jet/falanx#84 is coming from where?
Would it be possible to have a smaller reproduction in the online tool?

@jindraivanek
Copy link
Contributor

I think main culprit here is let ... in ... support (

atCurrentColumn (genLetOrUseList astContext bs +> ifElse isInSameLine (!- " in ") sepNln +> genExpr astContext e)
).

  • It doesn't work correctly for multiline expr after in - it tries to output it like this
let x = 1 in ()
             x

which is not valid

  • in shoudln't be used at all when generating from AST (I guess it is used because all nodes have same zero range).

I will try to fix it by disabling let ... in for multiline and when generating from AST.

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