Skip to content
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

Tail recursive hover and bug fix for correctly marking if else as tail recursive #6466

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

faldor20
Copy link
Collaborator

@faldor20 faldor20 commented Jan 30, 2024

This is an exploration of showing information about whether a function or closure is tail recursive.

It shows when hovering the function definition:
image
And in diagnostics:

image
image

This required me to change tail-recursive info gathered during canonicalization. I'm unsure if i can now remove the "mark_def_recursive" function or if there is some other kind of recursion I've not thought of.

@faldor20 faldor20 force-pushed the tail_recursive_hover branch 2 times, most recently from a305b09 to d1f53d1 Compare February 13, 2024 10:45
@faldor20
Copy link
Collaborator Author

I ended up passing around a is_tail parameter into a lot of the canonicalization functions that are able to be tail recursive. I could have stored this in env, but it felt kind of awkward to keep setting the environment to be tail rec and then not tail rec all over the place. I'll happily switch it if that's preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant