[gambit-list] debugging macros

lowly coder lowlycoder at huoyanjinjing.com
Thu Feb 26 16:27:13 EST 2009


(define-macro (define-cool-macro decl .
body)

`(begin

     (define-macro ,decl
, at body)
     (define-macro
,(cons
                     (string->symbol (string-append (symbol->string (car
decl)) "-dbg"))
                     (cdr decl))
, at body)))


(define-cool-macro (fn . body) `(lambda
, at body))


(pp (fn-dbg (x) (+ x
2)))



Now, does anyone see anything wrong with define-cool-macro, or some
way/something that may resulted in unexpected sideeffects (along the lines
of accidently introducing variables in macros).

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090226/e91b30ca/attachment.htm>


More information about the Gambit-list mailing list