You are looking at historical revision 13621 of this page. It may differ significantly from its current revision.
Explicit renaming macros, syntactic-closures and syntax-rules.
Just use this as a drop-in replacement for syntactic-closures. If you're only using syntax-rules macros, it also works as a drop-in replacement for the syntax-case egg.
You can compile syntax eggs by supplying the -Dcompile-syntax option to csc. This will compile the extension normally, and also compile all top-level macros and arrange for them to be installed at load-time. For extensions with a lot of macros this will substantially speed up load-time. Extensions that also do a lot of CPS-style macro processing will also be noticeably faster at expanding.
Compiled syntax currently only works with riaxpander, so it's not recommended for general purpose eggs which would otherwise have their choice of which macro system to use, but it can be very useful for your private code. A combined API is planned for the future so that you'll be able to compile with riaxpander and then load with either riaxpander or the syntactic-closures egg.
$ cat swap.scm (define-syntax swap! (syntax-rules () ((swap! a b) (let ((tmp a)) (set! a b) (set! b tmp))))) $ csc -s -O2 -R riaxpander -Dcompile-syntax swap.scm $ csi -R riaxpander -R swap . . . ; loading /usr/local/lib/chicken/3/riaxpander.so ... ; loading riaxpander-chicken-macros.so ... ; loading riaxpander-dsssl-lambda.scm ... ; loading ./swap.so ... #;1> (define x 1) #;2> (define y 2) #;3> (swap! x y) #;4> (list x y) (2 1) #;5>
Taylor R. Campbell
- adding support for compiled syntax extensions
- upstream bugfixes
- adding DSSSL support
- fixing vector (output) templates in syntax-rules
- allow case-sensitivity, added core chicken macros and vector pattern support
- initial release