More specific problem than #91, inlining and constant propagation currently generates unreachable bindings. This should be easier to solve than #91.
let x = 8 + 2, y = x * 2 in x + y;
outputs
"use strict";
var x = 10,
y = 20;
30;
The output should be:
"use strict";
30;
However if the binding is to a function, we cannot delete it so easily because the function may reference itself in its body or not be inlined because the depth is too great (Currently limited to 4):
with mod10 := \x -> ? x < 10 : x : mod10 (x -10) in {
mod10 101;
}
More specific problem than #91, inlining and constant propagation currently generates unreachable bindings. This should be easier to solve than #91.
outputs
The output should be:
However if the binding is to a function, we cannot delete it so easily because the function may reference itself in its body or not be inlined because the depth is too great (Currently limited to 4):
Outputs:
Where
x, x0, x1, and x2
are not reachable bymod10
is. #91 would probably be required to solve that fully.