Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closure conversion: Filter variables out of subst under lambda (#514)
PR #470 propagates substitutions down into lambdas, which works when the RHS is a constant or symbol but not if it's a variable, since that variable is now out of scope. This was breaking #485, which produces variable-for-variable substitutions often. Fortunately, variable-for-variable substitution under a lambda is also unnecessary (we already dealt with the free occurrences by making a closure element), so we can happily just filter out any such bindings.
- Loading branch information