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

Don't fold lets if the let-bound variable occurs under a lambda-abstraction #3029

Merged
merged 8 commits into from
Sep 13, 2024

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz added this to the 0.6.7 milestone Sep 13, 2024
@lukaszcz lukaszcz self-assigned this Sep 13, 2024
@lukaszcz lukaszcz marked this pull request as draft September 13, 2024 08:34
@lukaszcz lukaszcz marked this pull request as ready for review September 13, 2024 12:37
@@ -40,7 +40,7 @@ letFolding' isFoldable tab =
mapAllNodes
( removeInfo kFreeVarsInfo
. convertNode isFoldable tab
. computeFreeVarsInfo
. computeFreeVarsInfo' 2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd add a comment here explaining how this 2 prevents folding lets that bind variables in lambdas

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lukaszcz lukaszcz merged commit b609e1f into main Sep 13, 2024
4 checks passed
@lukaszcz lukaszcz deleted the fix-let-folding branch September 13, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't fold lets if the let-bound variable occurs under a lambda-abstraction
2 participants