[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] macro systems and chicken (long)
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] macro systems and chicken (long) |
Date: |
Wed, 9 Apr 2008 12:31:51 +0200 |
On Tue, Apr 8, 2008 at 12:45 PM, Alaric Snell-Pym
<address@hidden> wrote:
>
> riaxpander manages this:
>
>
> > (use riaxpander)
> >
> > (define-macro (my-assert test error)
> > `(if (not ,test) (error ,error)))
> >
> >
> > (define-syntax foo
> > (syntax-rules ()
> > ((_ x) (let ((tmp x)) (my-assert x "failed")))))
> >
> > (macroexpand '(let ((x 1)) (foo x)))
> >
> >
In this case the hygiene is actually circumvented: riaxpander
runs before the normal macro-expansion (the expansion of
low-level macros happens afterwards which makes this
work). Referential transparency requires that bindings that
are introduced by a hygienic macro may not be accessible by
name alone by other macros (context is required as well).
(Now, I believe this is the correct wording, but I may be wrong)
cheers,
felix
- Re: [Chicken-users] macro systems and chicken (long), (continued)
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/07
- Re: [Chicken-users] macro systems and chicken (long), Peter Bex, 2008/04/07
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/07
- Re: [Chicken-users] macro systems and chicken (long), Jim Ursetto, 2008/04/11
- Re: [Chicken-users] macro systems and chicken (long), Peter Bex, 2008/04/12
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/14
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/07
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/08
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/08
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/08
- Re: [Chicken-users] macro systems and chicken (long),
felix winkelmann <=
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/12
- Re: [Chicken-users] macro systems and chicken (long), Graham Fawcett, 2008/04/07
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/08
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/08
- Re: [Chicken-users] macro systems and chicken (long), felix winkelmann, 2008/04/09
- Re: [Chicken-users] macro systems and chicken (long), Alex Shinn, 2008/04/17
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/17
- Re: [Chicken-users] macro systems and chicken (long), Alex Shinn, 2008/04/17
- Re: [Chicken-users] macro systems and chicken (long), Alaric Snell-Pym, 2008/04/18
Re: [Chicken-users] macro systems and chicken (long), John Cowan, 2008/04/06