chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] define-macro in Chicken 4.0


From: Tobia Conforto
Subject: Re: [Chicken-users] define-macro in Chicken 4.0
Date: Sun, 15 Mar 2009 11:22:37 +0100

I wrote:
(import-for-syntax matchable)

(define-syntax define-macro
  (lambda (m . _)
    `(define-syntax ,(caadr m)
       (lambda (e . _)
         (match e
           (,(cadr m) ,@(cddr m)))))))

Eduardo, does this work for you?
I've tried it with some old macros I had lying around and it seems to work.

If you (and others) can confirm it works with all your existing base of define-macro code and it doesn't introduce new problems*, maybe we could make an egg of it.

-Tobia

* I know it doesn't solve any of define-macro's problems either, but that's not the aim.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]