-
Notifications
You must be signed in to change notification settings - Fork 847
Tail recursion warning and attribute, take 2 #15260
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
Closed
Closed
Conversation
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
Move work of Avi Avni to current sources but use a field in cenv instead of a function parameter to pass around
Member
|
per fsharp/fslang-design#82 (comment), I don't think an attribute is the way to go. |
Contributor
|
Please see this discussion comment: fsharp/fslang-design#82 (comment) |
# Conflicts: # src/Compiler/FSComp.txt
…e traversal to have the content ready when checking members which call each other
…the failing CI shows. Making isTailCall also mutable is error prone as one has to switch back to orig values in many places. So refactor to use a flag like Avi did. This should fix the side effects (shown by the failing CI) and more tailrec specific tests
Member
|
This should also be under a language version flag. |
# Conflicts: # src/Compiler/FSComp.txt # src/Compiler/Facilities/LanguageFeatures.fs # src/Compiler/Facilities/LanguageFeatures.fsi
Contributor
Author
Yes, absolutely. Thanks. |
…notated with [<TailRec>]
nojaf
reviewed
Jun 13, 2023
2 tasks
# Conflicts: # src/Compiler/FSComp.txt
…into add_tailcall_attr
…upfront and just traverse these
- keep warning for partial applications
Contributor
Author
|
An open question:
|
Contributor
Author
|
For those following along, I thing this PR is superseded by #15503 |
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.
The last time this was tried it didn't really work out.
But as there is an RFC it should be worth to work on.
So, to test the waters, here's a very early draft based on the work of @AviAvni
It's doing pretty much the same but
uses a field in cenv instead of a function parameter to pass around.collects the attributed vals in a different way.There's still a lot to do and I'll need help from more experienced people. Given the amount of support for the proposal last time, I hope we can make more progress this time.