On Fri 20 Jan 2012 21:26, Mark H Weaver <m...@netris.org> writes: > Andy Wingo <wi...@pobox.com> writes: >> `lexical' >> A lexically-bound variable. The value is a unique token (in >> the sense of `eq?') identifying this binding. >> >> `macro' >> A syntax transformer, either local or global. The value is >> the transformer procedure. > > Ironically, `syntax-local-binding' renders the current simple > implementation strategy of `the-environment' inadequate, because > identifier-syntax is no longer sufficient to simulate a lexical.
Why do you say that? > In particular, I was hoping to change the binding representation of > `syntax-rules' macros so that they are serializable. In particular, > they would be represented by the `syntax-rules' form itself (the same > one that psyntax currently passes to `primitive-eval' to produce the > transformer procedure). A weak-key hash table would cache the compiled > transformer procedures. > > This would allow (the-environment) to capture locally-bound > `syntax-rules' macros. Unfortunately, `syntax-local-binding', as > currently documented, now makes this impossible. Why do you think that? The procedures do carry metadata; I understood that that was your strategy, to use the serialization of the syntax-rules form in the procedure metadata. Andy -- http://wingolog.org/