[plt-scheme] associating names with static data

From: Dave Herman (dherman at ccs.neu.edu)
Date: Fri Jul 15 18:09:41 EDT 2005

Hello,

I'm trying to implement a library that associates static data with a 
variable name, but I can't if I ever want to provide that variable with 
a contract. The exported name will not be module-identifier=? to the 
original name, because it gets wrapped by the contract library.

So if I try to create a module-identifier-mapping that uses the 
variable's name as a key, but then I provide/contract the variable, the 
mapping is useless, because no one outside the module has access to the 
original name.

As I see it, the general problem is that one library sort of declares 
"first dibs" on the rights to use names for static information-- and the 
contract library has claimed these rights on basically every variable 
ever (except for names that are exclusively used for static information, 
like struct type names, and therefore don't ever have contracts 
associated with them).

Any suggestions? Maybe the simplest solution would be for the contract 
library to offer some macro to extract the original binding of a wrapped 
name, so that I could at least follow up the provide/contract with some 
expansion-time code that maps the new name in the 
module-identifier-mapping to whatever the old name was mapped to.

Thanks,
Dave



Posted on the users mailing list.