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.
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.
https://github.com/pure-c/pure-c/blob/955df0c796d94dd4da91019db7ae4e7770c1fe5e/src/Language/PureScript/CodeGen/C.purs#L950-L958