-
Notifications
You must be signed in to change notification settings - Fork 83
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
MultiWayIf formatted with four spaces #1002
Comments
There is a reason for this, see #488. |
Yeah, I wonder whether we might want to revisit that, given that we have the same problem with testing =
do
succ
1 In #707 (comment), we decided that this should be a fixed point, as indenting the bodies of From a consistency standpoint, shouldn't we change |
I agree with this. Aside: I have never even seen code that applies the RHS of a multi-way if to an argument; I didn't know it was possible. 😅 |
Note that if we start using 1 space, then whatever is nested inside that 1-space-indented block is going to be at odd (literally) indentations: 3, 5, etc., and it this kind of code block can be potentially large, which is the worst. I do understand the consistency argument though. |
Another alternative that would fix this issue and also improve consistency: What about identing I.e. this would be a fixed point, note how applied
|
@amesgen I quite like this idea. |
Describe the bug
gets formatted into this
Expected behavior
It should not be formatted with four spaces.
Environment
ormolu 0.5.3.0 1b39d94d0c06aa53a577f7e0476695f9e6f5020b using ghc-lib-parser 9.4.3.20221104
The text was updated successfully, but these errors were encountered: