macro-stepper: update for new letrec-syntaxes+values expansion

original commit: 0f0dd65d83ca836af798d132f49b0986d1d142d0
This commit is contained in:
Ryan Culpepper 2011-07-18 05:22:18 -06:00
parent 15ad6d8edb
commit d19c2208c9
3 changed files with 9 additions and 6 deletions

View File

@ -120,7 +120,8 @@
(define-struct (lderiv node) (?1 derivs) #:transparent)
;; A BDeriv is
;; (make-bderiv <Node(Stxs)> (list-of BRule) (U 'list 'letrec) LDeriv)
;; (make-bderiv <Node(Stxs)> (list-of BRule) (U 'list 'letrec) LDeriv/Deriv)
;; pass2 is Deriv if 'letrec, LDeriv if 'list
(define-struct (bderiv node) (pass1 trans pass2) #:transparent)
;; A BRule is one of

View File

@ -504,8 +504,8 @@
[(enter-block (? BlockPass1) block->list (? EL))
(make bderiv $1 (and $4 (wlderiv-es2 $4))
$2 'list $4)]
[(enter-block BlockPass1 block->letrec (? EL))
(make bderiv $1 (and $4 (wlderiv-es2 $4))
[(enter-block BlockPass1 block->letrec (? EE))
(make bderiv $1 (and $4 (list (wderiv-e2 $4)))
$2 'letrec $4)])
;; BlockPass1 Answer = (list-of BRule)

View File

@ -506,10 +506,12 @@
[#:pass2]
[#:if (eq? trans 'letrec)
(;; FIXME: foci (difficult because of renaming?)
[#:walk (wlderiv-es1 pass2) 'block->letrec])
[#:walk (list (wderiv-e1 pass2)) 'block->letrec]
[#:pattern (?expr)]
[Expr ?expr pass2])
([#:rename ?block (wlderiv-es1 pass2)]
[#:set-syntax (wlderiv-es1 pass2)])]
[List ?block pass2])]
[#:set-syntax (wlderiv-es1 pass2)]
[List ?block pass2])])]
[#f
(R)]))