[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

structures at expansion time



I'm trying to write a library which stores expansion-time information
in identifiers (like signatures contain a vector of symbols) for
access by several different modules. There is one core module which
provides syntax for building information. The core module is required
by several others which use this syntax. Since the information is
somewhat complex, I was trying to store it in structures. The
structure definitions are in another module require-for-syntax'd by
the core module.

However, it seems that the structure definitions are re-evaluated
every time the core module is required, so information built in one
module cannot be accessed by another (because the accessors don't
match the right structure type).

While I think I understand why the module system works this way (to
make separate compilation consistant?), it seems to imply that
expansion-time information (to be accessed by syntax-local-value)
cannot usefully contain anything but built-in data types.

Is there any way to get this to work, or do I need to take a
different approach? For the moment I've replaced the structures by
lists tagged with symbols, but that seems somewhat wrong. I also had
trouble compiling modules containing expansion-time structures to
extensions.

Thanks,
Ryan



__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/