This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

macros: help reqd.


As a first step to porting FPS, I want to write Olin Shivers'
define-record macro so that it works with guile.

In FPS, define-record is written to use an explicit renaming macro system. 
I decided that implementing the explicit renaming system is a bit too much
to take on for one's first scheme program. (Assuming it can be done in
scheme.)

Instead I intend to rewrite the define-record macro. I can do this using
guile's define-macro, but the resulting macro uses will be vulnerable to
the bindings of keywords in their environment (won't they?).

I can't use the syntax-case macros on their own, because define-record is
unhygienic (it defines global constructors, accessors, type-predicates
etc.)

So my question is, how do I write unhygienic macros in guile that are not
prone to having their global references captured?

Ian