fixed bug in expansion of (this-package-in main)

This commit is contained in:
Ryan Culpepper 2011-04-07 09:44:44 -06:00
parent 3e5a54c9e4
commit eb60d3d479

View File

@ -18,9 +18,15 @@
(define-syntax this-package-in
(make-require-transformer
(syntax-parser
[(~and src (_ (~or (~datum main) suffix:id) ...))
(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))))]))))