~ chicken-core (chicken-5) 5572cec09b06cd7dbeeb88d00234fe333afd8f7f
commit 5572cec09b06cd7dbeeb88d00234fe333afd8f7f Author: felix <felix@call-with-current-continuation.org> AuthorDate: Fri Mar 18 19:27:05 2011 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Fri Mar 18 19:27:05 2011 +0100 module uses ##sys#validate-exports diff --git a/expand.scm b/expand.scm index 9b12f0ba..7e1e3467 100644 --- a/expand.scm +++ b/expand.scm @@ -1313,17 +1313,18 @@ (##sys#er-transformer (lambda (x r c) (##sys#check-syntax 'module x '(_ symbol _ . #(_ 0))) - `(##core#module - ,(cadr x) - ,(if (eq? '* (##sys#strip-syntax (caddr x))) - #t - (caddr x)) - ,@(let ((body (cdddr x))) - (if (and (pair? body) - (null? (cdr body)) - (string? (car body))) - `((##core#include ,(car body))) - body)))))) + (let ((exports (##sys#validate-exports (##sys#strip-syntax (caddr x)) (cadr x)))) + `(##core#module + ,(cadr x) + ,(if (eq? '* exports) + #t + (caddr x)) + ,@(let ((body (cdddr x))) + (if (and (pair? body) + (null? (cdr body)) + (string? (car body))) + `((##core#include ,(car body))) + body))))))) (##sys#extend-macro-environment 'begin-for-syntaxTrap