-
Notifications
You must be signed in to change notification settings - Fork 152
newtypes are formatted on two lines with break_single_constructors: false #342
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
Comments
newtype
s are formatted on two lines with break_single_constructors: false
Okay, having now found the place in the source that explicitly checks this and the test case that claims the current behavior is correct, it seems like @jaspervdj wants this behavior. I still find it unintuitive - if it's not too much configuration bloat could we add a |
Default behavior remains the same, but when you set `break_newtypes` to `false` newtypes will be formatted on a single line.
I think this accident @imuli . newtype and data have to be consistent. let's fix that. |
Hello, any progress on that? Maybe I can help somehow? |
Yeah this is accidental. I would welcome a PR that fixes this :-) |
IMO this should be the default behavior, but it is somewhat breaking change (people might get big diffs) if we just directly alter the current behavior. If this is acceptable I would go this way as I see no strong reasons to distinguish Otherwise, @imuli has a fix which should be backwards compatible in cost of introducing a new option. Which one would you prefer? |
I think the primary issue with my fix as it stands is that it doesn't provide any tests? I also would have no complaints about somone removing the option in favor of |
Default behavior remains the same, but when you set `break_newtypes` to `false` newtypes will be formatted on a single line.
Default behavior remains the same, but when you set `break_newtypes` to `false` newtypes will be formatted on a single line.
As
newtype
s always have a single constructor, you would think that theywould obey
break_single_constructors
. However, with that set to false,becomes
while
data
with a single constructor stay on one line.The text was updated successfully, but these errors were encountered: