chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] syntax-rules segment matching?


From: Jack Trades
Subject: [Chicken-users] syntax-rules segment matching?
Date: Mon, 29 Dec 2008 16:54:32 -0600

(define-syntax def
  (syntax-rules ()
    ((def (name arg ... (opt-arg opt-value) ...) body ...)
      (define (name arg ... #!optional (opt-arg opt-value) ...) body ...))))

Error: during expansion of (syntax-rules ...) - segment matching not implemented: (arg ... (opt-arg opt-value) ...)

Will segment matching be coming to Chicken 4 soon?  In the meantime is there a workaround?  A few core parts of my DSL are written with segment matching macros and like the old saying "You don't know what you've got till it's gone."

Also would this work, even if segment matching was implemented?  I think Chicken 4 wiped out my previous versions so I can't test it.  Is there a proper way to use #!optional, #!rest and the like, or equivalent functions like opt-lambda?

All in all, I'm very impressed with the new Chicken.  It's very easy to use even for a beginning Schemer.  Keep up the good work.

Thanks
Jack Trades

reply via email to

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