Dear all,<br><br>Apparently I still don't have my macro writing licence.<br>I'm stuck somewhere around syntax-case and with-syntax.<br><br>Here is my problem.<br>Suppose something like this:<br><br>(define-syntax (class->singleton stx)<br>
(syntax-case stx ()<br> [(_ cl)<br> (with-syntax ([(name ...) <br> (interface->method-names (class->interface #'cl))]) ; ***<br> #'(begin (define-something name)<br>
...))]))<br><br>(class->singleton a%)<br><br>On line *** I want to match (name ...) with the list of method-names of <br>the given class (here a%).<br>Obviously, this is wrong, since #'cl is just a syntaxed identifier IIUC,<br>
but should be the class itself.<br>datum->syntax and syntax->datum don't help either, so what should I do?<br>Any hint (even an RTFM link) would be appreciated.<br><br>Thanks,<br>Laurent<br><br><br>