Fix for 6.4 and 6.5 where with-disappeared-uses does not allow multiple body statements.

This commit is contained in:
Georges Dupéron 2016-08-29 23:16:57 +02:00
parent 6475b89bc8
commit 468495937c

View File

@ -33,6 +33,7 @@
#:with colon-stxclass (format-id #'cls ":~a" #'cls)
#:with name-forward (format-id #'name "~a-forward-attributes" #'name)
(with-disappeared-uses
(let ()
(define c (syntax-local-value/record #'cls syntax/parse:stxclass?))
(define attrs (syntax/parse:stxclass-attrs c))
(define/with-syntax (attr-name ) (map syntax/parse:attr-name attrs))
@ -40,7 +41,8 @@
(stx-map (λ (a) (datum->syntax #'body (syntax-e a)))
#'(attr-name )))
(define-temp-ids "~a/arg" (attr-name ))
(define/with-syntax (attr-depth ) (map syntax/parse:attr-depth attrs))
(define/with-syntax (attr-depth )
(map syntax/parse:attr-depth attrs))
#'(begin
(define (name stx2)
(syntax-parameterize ([stx (make-rename-transformer #'stx2)])
@ -64,4 +66,4 @@
(attribute #,(format-id stx3 "~a.~a"
#'forward-args-prefix
'attr-name))
)]))))])))
)])))))])))