Dear all,

Apparently I still don't have my macro writing licence.
I'm stuck somewhere around syntax-case and with-syntax.

Here is my problem.
Suppose something like this:

(define-syntax (class->singleton stx)
  (syntax-case stx ()
    [(_ cl)
     (with-syntax ([(name ...)
                    (interface->method-names (class->interface #'cl))]) ;
***
       #'(begin (define-something name)
                ...))]))

(class->singleton a%)

On line *** I want to match (name ...) with the list of method-names of
the given class (here a%).
Obviously, this is wrong, since #'cl is just a syntaxed identifier IIUC,
but should be the class itself.
datum->syntax and syntax->datum don't help either, so what should I do?
Any hint (even an RTFM link) would be appreciated.

Thanks,
Laurent
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to