mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-09 14:07:34 +02:00
fixing simplify bug, neither var can be mutated for a let id substitution (issue 30)
This commit is contained in:
parent
b8e816c460
commit
59e88c7ded
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,9 @@ static sexp simplify (sexp ctx, sexp ast, sexp init_substs, sexp lambda) {
|
|||
if (sexp_not(sexp_memq(ctx, sexp_car(p2), sv))
|
||||
&& (! sexp_pointerp(sexp_car(ls2)) || sexp_litp(sexp_car(ls2))
|
||||
|| (sexp_refp(sexp_car(ls2))
|
||||
&& sexp_lambdap(sexp_ref_loc(sexp_car(ls2)))))) {
|
||||
&& sexp_lambdap(sexp_ref_loc(sexp_car(ls2)))
|
||||
&& sexp_not(sexp_memq(ctx, sexp_ref_name(sexp_car(ls2)),
|
||||
sexp_lambda_sv(sexp_ref_loc(sexp_car(ls2)))))))) {
|
||||
tmp = sexp_cons(ctx, sexp_car(app), sexp_car(ls2));
|
||||
tmp = sexp_cons(ctx, sexp_car(p2), tmp);
|
||||
sexp_push(ctx, substs, tmp);
|
||||
|
|
Loading…
Add table
Reference in a new issue