[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Implementing a macroexpand-all
From: |
Alan Post |
Subject: |
Re: [Chicken-users] Implementing a macroexpand-all |
Date: |
Fri, 11 Feb 2011 13:12:56 -0700 |
If you figured it out that would be amazing. I'm not sure myself
what the core binding forms are, but this is a very interesting
problem, I'm enjoying reading about you digging it up.
-Alan
On Fri, Feb 11, 2011 at 03:10:03PM -0500, Patrick Li wrote:
> Great. Thanks for that tip! I think I will try and figure it out.
> As long as I can figure out what the core binding-introducing forms are, I
> think I can do it.
> -Patrick
> On Fri, Feb 11, 2011 at 2:56 PM, Peter Bex <address@hidden> wrote:
>
> On Fri, Feb 11, 2011 at 02:46:58PM -0500, Patrick Li wrote:
> >
> > The "when" should not be macroexpanded because it is a local binding
> > introduced by the let form. In that context, it is actually *not* a
> macro.
> >
> > Does anyone know which forms introduce new bindings? How can I check
> this
> > up?
>
> I'm afraid to really do this properly you'd need to implement your own
> macro-expander. You need to do all sorts of bookkeeping to get your
> syntactic environments straight. The macro-expander needs to know about
> core forms like LET and extend the environment accordingly when those
> are
> used. See expand.scm in Chicken core (hairy!), or alexpander in the
> Chicken 3 egg repo (cleaner, but still rather tricky) for an example of
> such things.
>
> Cheers,
> Peter
> --
> [2]http://sjamaan.ath.cx
> --
> "The process of preparing programs for a digital computer
> is especially attractive, not only because it can be economically
> and scientifically rewarding, but also because it can be an aesthetic
> experience much like composing poetry or music."
> -- Donald Knuth
>
> References
>
> Visible links
> 1. mailto:address@hidden
> 2. http://sjamaan.ath.cx/
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
--
.i ko djuno fi le do sevzi
- [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/11
- Re: [Chicken-users] Implementing a macroexpand-all, Christian Kellermann, 2011/02/11
- Re: [Chicken-users] Implementing a macroexpand-all, Felix, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Peter Bex, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Peter Bex, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Peter Bex, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/12
- Re: [Chicken-users] Implementing a macroexpand-all, Patrick Li, 2011/02/12