Skip to content

Fix free variable calculation#152

Merged
alastairreid merged 2 commits into
masterfrom
areid-fix-freevars
Jun 23, 2026
Merged

Fix free variable calculation#152
alastairreid merged 2 commits into
masterfrom
areid-fix-freevars

Conversation

@alastairreid

Copy link
Copy Markdown

The handling of '__let x = e1 __in e2' (which, like in OCaml lets you
assign to a temporary variable in the middle of an expression), was not
handling the fact that the scope of the variable 'x' is just 'e2'.

In particular, the :metadata command was sometimes listing these
variables as global variables that are assigned to by a function instead of
ignoring them (because they are local variables).

The handling of '__let x = e1 __in e2' (which, like in OCaml lets you
assign to a temporary variable in the middle of an expression), was not
handling the fact that the scope of the variable 'x' is just 'e2'.

In particular, the :metadata command was sometimes listing these
variables as global  variables that are assigned to by a function instead of
ignoring them (because they are local variables).
@alastairreid alastairreid merged commit a4601e5 into master Jun 23, 2026
1 check passed
@alastairreid alastairreid deleted the areid-fix-freevars branch June 23, 2026 11:14
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.

2 participants