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
On Sat, Mar 14, 2009 at 10:27 AM, Eduardo Cavazos
wayo.cava...@gmail.com wrote:
Well, I have some portable Scheme code; i.e. code that runs on a few
implementations. In that code are some macros which intentionally break
hygiene. So that rules out syntax-rules. Just about everybody supports
On Sun, Mar 15, 2009 at 11:22 AM, Tobia Conforto
tobia.confo...@gmail.com wrote:
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
felix winkelmann wrote:
Sorry, but this does not work. An identifier introduced by a
previous (hygienic) macro expansion will not be correctly expanded.
Does this mean that you can't mix define-macro macros (with my
definition) and syntax-rules macros, or that two or more define-macro
On Sun, Mar 15, 2009 at 12:31 PM, Tobia Conforto
tobia.confo...@gmail.com wrote:
felix winkelmann wrote:
Sorry, but this does not work. An identifier introduced by a previous
(hygienic) macro expansion will not be correctly expanded.
Does this mean that you can't mix define-macro macros
On Fri, Mar 13, 2009 at 8:48 PM, Eduardo Cavazos wayo.cava...@gmail.com wrote:
Hello,
Is there a way to define 'define-macro' in terms of the new explicit
renaming macros of Chicken 4.0? Or is it offered somewhere and I just missed
it?
I know I know... 'define-macro' is bad. :-) But I have
On Fri, Mar 13, 2009 at 8:48 PM, Eduardo Cavazos
wayo.cava...@gmail.com wrote:
Is there a way to define 'define-macro' in terms of the new explicit
renaming macros of Chicken 4.0? Or is it offered somewhere and I just missed
it?
I know I know... 'define-macro' is bad. :-) But I have a bunch
Hello,
Is there a way to define 'define-macro' in terms of the new explicit
renaming macros of Chicken 4.0? Or is it offered somewhere and I just
missed it?
I know I know... 'define-macro' is bad. :-) But I have a bunch of code
that I'd like to have just work in Chicken 4.0 and worry about
Eduardo Cavazos scripsit:
Is there a way to define 'define-macro' in terms of the new explicit
renaming macros of Chicken 4.0? Or is it offered somewhere and I just
missed it?
Quick and dirty approach:
For (define-macro name (lambda exp body ...))
read (define-syntax name (lambda (exp
cowan scripsit:
For (define-macro name (lambda exp body ...))
read (define-syntax name (lambda (exp junk-1 junk-2) body ...))
Ooopsie. Make that (define-syntax (er-macro-transformer (lambda ...)))
--
John Cowanco...@ccil.org http://www.ccil.org/~cowan
But no living man am I! You
Eduardo Cavazos wrote:
Hello,
Is there a way to define 'define-macro' in terms of the new explicit
renaming macros of Chicken 4.0?
Sure!
(import-for-syntax matchable)
(define-syntax define-macro
(lambda (m . _)
`(define-syntax ,(caadr m)
(lambda (e . _)
(match e
11 matches
Mail list logo