From 2cf0bb9bbafbf4228d99505be855a050ee97b13d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 12 Jun 2001 17:11:08 +0000 Subject: [PATCH] . original commit: 2503c4e601c16f84017786e60dbc08de12f8bdf9 --- collects/mzlib/unit.ss | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/collects/mzlib/unit.ss b/collects/mzlib/unit.ss index 66a3e3e..7713944 100644 --- a/collects/mzlib/unit.ss +++ b/collects/mzlib/unit.ss @@ -247,13 +247,19 @@ all-expanded))]) ;; Build up set! redirection chain: (with-syntax ([redirections - (map - (lambda (varloc) - (with-syntax ([(var loc) varloc]) - (syntax - [var (make-id-mapper (quote-syntax (unbox loc)))]))) - (syntax->list - (syntax ((ivar iloc) ... (expname eloc) ...))))] + (let ([varlocs + (syntax->list + (syntax ((ivar iloc) ... (expname eloc) ...)))]) + (with-syntax ([vars (map stx-car varlocs)] + [rhss + (map + (lambda (varloc) + (with-syntax ([(var loc) varloc]) + (syntax + (make-id-mapper (quote-syntax (unbox loc)))))) + varlocs)]) + (syntax + ([vars (values . rhss)]))))] [num-imports (datum->syntax-object (quote-syntax here) (length (syntax->list (syntax (iloc ...)))) @@ -269,7 +275,7 @@ (list (vector eloc ...) (lambda (iloc ...) (let ([intname undefined] ...) - (letrec-syntax redirections + (letrec-syntaxes redirections (void) ; in case the body would be empty defn&expr ...))))))))))))))))))])))