Extra space after opening parenthesis #87
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#87
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
brittany produces the following:
I would expect this instead:
The location of the closing parenthesis, of course, could be a matter of taste. But that opening space seems to indicate brittany is expecting a tuple rather than a precedence-defining, single-element parenthetical.
hmm, the space could be changed using
and that seems indeed nicer.
The closing parenthesis is a different matter, for cases like
where the alternative would be..
right? or perhaps
I think i like the first option the most. There is a more fundamental reason for this behaviour, too: It is really hard to decide (with brittanys algorithm) if there is sufficient space in the last line of the child node to append the closing parenthesis. Possible to adapt the algorithm, but a good bit of low-level changes.
I'll wait for feedback for a bit; default action will be to apply the above diff resulting in these layouts:
Proposed action sounds great to me.
I'm in favor of keeping the line break before the closing paren.
Implemented as proposed.