Kevin Ryde <[EMAIL PROTECTED]> writes: > In guile 1.6.1 on a recent i386 debian, I thought to use "export" > inside a syntax-rules in a module definition, for instance > > (define-module (abc def) > #:use-module (ice-9 syncase))
You might want to use #:use-syntax (ice-9 syncase) here instead, otherwise syntax-case expansion is only invoked when syntax-case macros are called in an s-expression. That disables singleton macros and can cause unexpected errors with regard to scope. > (define-syntax foo > (syntax-rules () > ((foo name) > (export name)))) > > (define x 123) > (foo x) > > But I got an error, > > ERROR: In procedure variable-ref: > ERROR: Wrong type argument in position 1 (expecting variable): #f > > Is this sort of thing meant to work, or have I made some basic error? > > (I was looking to make "-public" versions of some macros. I got the > effect I wanted with a procedure->macro, but just wondered if the > syntax-rules style was valid.) This is caused by a bug in syncase.scm. I've fixed this in CVS 1.7.0 and in the 1.6 branch. 1.6.2 will contain the fix. 2003-01-27 Mikael Djurfeldt <[EMAIL PROTECTED]> * syncase.scm (guile-macro): Strip syntactic information from expression before trying to treat it as a Guile macro call. (Thanks to Kevin Ryde.) _______________________________________________ Bug-guile mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-guile