From eb60d3d479c5fc36ba1e977c8fb8d80fa10b9c7e Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Thu, 7 Apr 2011 09:44:44 -0600 Subject: [PATCH] fixed bug in expansion of (this-package-in main) --- collects/planet/version.rkt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/collects/planet/version.rkt b/collects/planet/version.rkt index 8217cd78f0..587065285a 100644 --- a/collects/planet/version.rkt +++ b/collects/planet/version.rkt @@ -18,9 +18,15 @@ (define-syntax this-package-in (make-require-transformer - (syntax-parser - [(~and src (_ (~or (~datum main) suffix:id) ...)) - (expand-import + (lambda (stx) + (define-syntax-class suffix + #:description "module suffix identifier" + (pattern (~datum main) #:attr suf #f) + (pattern suf:id)) + (syntax-parse stx + [(_ s:suffix ...) + (expand-import #`(combine-in - #,@(for/list ([suf (in-list (attribute suffix))]) - (make-planet-require-spec #'src suf))))]))) + #,@(for/list ([src (in-list (attribute s))] + [suf (in-list (attribute s.suf))]) + (make-planet-require-spec src suf))))]))))