match: ensure entire `body' is traversed when eliminating unused temps

This commit is contained in:
Bogdan Popa 2020-11-07 15:53:21 +02:00 committed by Sam Tobin-Hochstadt
parent 21cd97f2b2
commit 0f5ba032bf

View File

@ -149,8 +149,9 @@
(for/first ([tmp (in-list (hash-keys todo))] #:when (free-identifier=? tmp stx)) (for/first ([tmp (in-list (hash-keys todo))] #:when (free-identifier=? tmp stx))
(hash-remove! todo tmp) (hash-remove! todo tmp)
(hash-set! seen tmp #t))] (hash-set! seen tmp #t))]
[(list? (syntax-e stx)) [(syntax->list stx)
(for-each loop (syntax-e stx))])) => (lambda (stxs)
(for-each loop stxs))]))
(for/lists (tmps accs) (for/lists (tmps accs)
([tmp (in-list (syntax-e tmps))] ([tmp (in-list (syntax-e tmps))]
[acc (in-list (syntax-e accs))] [acc (in-list (syntax-e accs))]