-
Notifications
You must be signed in to change notification settings - Fork 790
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
[FS-1047] - match! (match-bang) #4427
Merged
Merged
Changes from 9 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
aafdb02
Attempt add match! syntax to parser (as normal match) (does not work)
jwosty 958a208
Add name for MATCH_BANG token ("keyword 'match!')
jwosty 53a67cb
Make match! valid in (and only in) computational expressions
jwosty 96f297b
match! works
jwosty a3bcd93
Merge remote-tracking branch 'upstream/master' into match-bang
jwosty 8d9ee1b
Add match! to xlf localization files
jwosty a3e40e0
Add two tests for match!
jwosty 582efb0
Don't use left-pipe
jwosty 353435a
Give match! keyword a description
jwosty 8dc2e5c
Fix syntax error, and change match! description
jwosty 6f21ec7
xlf updated
jindraivanek 4dc2a31
Merge pull request #1 from jindraivanek/xlf
jwosty 772bf52
Add match! keyword description to resx
jwosty 2593cf4
Update FSComp.fs
jwosty 9e6f2dc
Write quotation test for match!
jwosty c1fd9a8
First crack at compile error tests
jwosty cb6ea74
Fix baselines
jwosty 596c84e
Fix baseline one more time
jwosty 63ef27b
Add vs baseline
jwosty 0a09ded
Merge branch 'master' into match-bang
jwosty 4308cd0
Merge branch 'master' into match-bang
jwosty 9888a55
Fix merge mistake
jwosty 44f76ba
Fix merge mistake (#2)
Nhowka a94123e
Fix merge mistake in tests
jwosty 0ef4996
Merge branch 'master' into match-bang
jwosty fc7916f
Merge branch 'master' into match-bang
jwosty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to not mention async CEs here (even if they're likely to be the most common use case). Perhaps something along these lines?
"Used in a computation expression to pattern match directly over the result of a call to another computation expression."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cartermp I was doing that to be consistent with the descriptions for the other "bang" keywords; they all seem to mention asyncs. Would this be an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newbies will be scared by the repeated use of the term computation expression. Also, that still doesn't clearly explain what match! does IMHO. How about just "Shorthand for let! and then match"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newbies will be scared by the repeated use of the term computation expression. Also, that still doesn't clearly explain what match! does IMHO. How about just "Shorthand for let! and then match"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jwosty It's actually all inconsistent 😢 -
let!
mentions async, butyield!
is just about CEs. I think the keyword descriptions here should be generic in its description, just like the feature itself.@isaacabraham Have you experienced that with messages like what we have in
yield!
?"Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression."
How would you suggest changing this to only mention CEs once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cartermp OK, as long as we're being consistently inconsistent. 😜 (kidding, maybe we can fix the others some time). I personally would prefer them not to mention async's as well; I'll make that change.
In any case I think I like your suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a merging of those two ideas? e.g. something like
"Used in a computation expression to pattern match directly over the result of a call to another computation expression. Equivalent to let! followed by match"
The more I think about this idea, the less I like it... It just takes the worst of both worlds