Macro stepper: reductions preserve properties etc

svn: r5931

original commit: bdd53d5f3ca5354abf865db63b7b6be4b134b1a7
This commit is contained in:
Ryan Culpepper 2007-04-13 21:25:34 +00:00
parent cd359e9c9a
commit b75eab9467

View File

@ -104,7 +104,7 @@
(cond [(pair? stx)
(cons x (cdr stx))]
[(syntax? stx)
(datum->syntax-object stx (cons x (stx-cdr stx)))]
(datum->syntax-object stx (cons x (cdr (syntax-e stx))) stx stx)]
[else (raise-type-error 'stx-replcar "stx-pair" stx)]))
;; stx-replcdr : syntax syntax -> syntax
@ -112,7 +112,7 @@
(cond [(pair? stx)
(cons (car stx) x)]
[(and (syntax? stx) (pair? (syntax-e stx)))
(datum->syntax-object stx (cons (stx-car stx) x))]
(datum->syntax-object stx (cons (car (syntax-e stx)) x) stx stx)]
[else (raise-type-error 'stx-replcdr "stx-pair" stx)]))
(define (sd x)