fix parsing certain multiline match / indentation cases#6078
Merged
fix parsing certain multiline match / indentation cases#6078
match / indentation cases#6078Conversation
Closed
96dfe26 to
33111dc
Compare
match / indentation cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
There is a weird situation currently in a
match/withwhere if a function argument starts in the same column as the start of the scrutinee, there's a parse failure. e.g.,So that's weird.
How do we want this to work?
If we want all of the above to work, then merging this PR will do that and fix #6048.
What does this change accomplish and why?
Include "before and after" examples if appropriate. (You can copy/paste screenshots directly into this editor.)
List any Github issues that this PR closes, in closing-issues-using-keywords format.
Implementation approach and notes
The PR just adds
matchto the set of syntax constructions in which to not emit virtual semis; equivalent to surrounding the contents in parens.I wonder whether
handle/withneeds the same treatment? But it didn't exhibit exactly the same bug so idk.Interesting/controversial decisions
Test coverage
New before-and-after transcript in the two commits.
Seems good.
Loose ends
n/a
Final checklist
.cabalfiles, make sure thepackage.yamlfiles are up-to-date instead.