-----Original Message----- From: Jos Koot [mailto:[email protected]] Sent: 21 April 2011 14:36 To: 'Veer'; '[email protected]' Subject: RE: [racket] How to use structure inside define-syntax ?
Wrap the definition of the struct in begin-for-syntax. Jos > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Veer > Sent: 21 April 2011 14:22 > To: [email protected] > Subject: [racket] How to use structure inside define-syntax ? > > How do I use structure's constructor in define-syntax . > > I want to do something like this : > > (struct proc-struct (name args loe)) > > (define-for-syntax (process ps) > #'#t) > > > (define-syntax (procedure stx) > (syntax-case stx () > [(_ name args e1 e2 ...) > (process (proc-struct #'name (syntax->list #'args) (syntax->list > #'(e1 e2 ...))))])) > > > > (procedure abc (x y) 2 3) > > > Is there something like struct-for-syntax ? > > Thanks > _________________________________________________ > For list-related administrative tasks: > http://lists.racket-lang.org/listinfo/users _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

