Overloaded BindN, BindNReturn, and MergeSourcesN members for applicative CE's#9605
Closed
baronfel wants to merge 17 commits intodotnet:mainfrom
Closed
Overloaded BindN, BindNReturn, and MergeSourcesN members for applicative CE's#9605baronfel wants to merge 17 commits intodotnet:mainfrom
baronfel wants to merge 17 commits intodotnet:mainfrom
Conversation
3f39365 to
aa54328
Compare
Contributor
|
I will add some tests/sample code. |
769d7cc to
c089240
Compare
…rgeSourcesN overloads This mechanism uses 'N'-suffixes for the members and takes tuples of varying lengths as the inputs. This allows for the same member name to be overloaded, and allows for some SRTP-friendly use cases.
de4ff50 to
c04d01c
Compare
Contributor
|
As per #9586 (comment) I think I will close this out |
Contributor
|
#9586 is needed for the strong type samples to work, but not for the reflection based ones. |
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.
This PR is an experiment I've been doing with @gusty to see how the alternative, overload-based syntax for the applicative CE members might look. It's built on top of his tuple-unification PR (#9586) to allow for SRTPs to target arbitrary-length tuples.
My logic changes are entirely constrained to TypeChecker.fs, and should only be in the TcComputationExpression function, as is to be expected from changes to...typechecking CEs.
A few changes were made to the logic, but overall it seems to be working quite well in my initial tests: