moving machines
This commit is contained in:
parent
2347568a6c
commit
73177ceddc
|
@ -341,13 +341,16 @@
|
||||||
|
|
||||||
(define-for-syntax (add-eres-lets an-istx res-proj-vars arg/res-to-indy-var stx)
|
(define-for-syntax (add-eres-lets an-istx res-proj-vars arg/res-to-indy-var stx)
|
||||||
(cond
|
(cond
|
||||||
[(ormap eres? (istx-ress an-istx))
|
;; WRONG: this needs to use its own, new set of variables
|
||||||
(with-syntax ([(vars ...) (map arg/res-var (istx-ress an-istx))]
|
[(and (istx-ress an-istx)
|
||||||
[(rhs ...) (map (λ (res-proj-var res)
|
(ormap eres? (istx-ress an-istx)))
|
||||||
#`(#,res-proj-var #,@(map arg/res-to-indy-var (arg/res-vars res))))
|
(for/fold ([body stx])
|
||||||
(vector->list res-proj-vars)
|
([an-arg/res (in-list (reverse (istx-ress an-istx)))]
|
||||||
(istx-ress an-istx))])
|
[res-proj-var (in-vector res-proj-vars (- (vector-length res-proj-vars) 1) -1 -1)])
|
||||||
#`(let ([vars rhs] ...) #,stx))]
|
(if (arg/res-vars an-arg/res)
|
||||||
|
#`(let ([#,(arg/res-var an-arg/res) (#,res-proj-var #,@(map arg/res-to-indy-var (arg/res-vars an-arg/res)))])
|
||||||
|
#,body)
|
||||||
|
body))]
|
||||||
[else stx]))
|
[else stx]))
|
||||||
|
|
||||||
(define-for-syntax (mk-wrapper-func an-istx used-indy-vars)
|
(define-for-syntax (mk-wrapper-func an-istx used-indy-vars)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user