Only capture bindings in scope that are actually used
felixSchl opened this issue · 1 comments
felixSchl commented
Currently, during lambda erasure, continuations will capture everything that was introduced up to that point, regardless of whether the continuation will make use of it or not. We should instead analyze what bindings the continuation actually makes use of and only capture those.
felixSchl commented
Can probably use the new isReferenced
function on each captured binding and the function ast.