[plt-scheme] associating names with static data

From: Robby Findler (robby at cs.uchicago.edu)
Date: Fri Jul 15 19:09:44 EDT 2005

I'm not sure how I can help, but I'll just say that provide/contract
makes up a new name and provides that name instead of your definition's
name. Also do keep in mind that the value inside the module does not
have the same behavior as the one outside, which is where this problem
stems from, I suppose.

You can probably write a variation of provide/contract that does what
you want and expands into provide/contract, but I'm just guessing,
since I'm not sure what exactly you're doing.

Good luck.

Robby

At Fri, 15 Jul 2005 18:09:41 -0400, Dave Herman wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> 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.