[racket-dev] Blame and re-provided bindings

From: Stevie Strickland (sstrickl at ccs.neu.edu)
Date: Sat Jan 15 12:29:59 EST 2011

On Jan 15, 2011, at 12:26 PM, Stevie Strickland wrote:
> On Jan 15, 2011, at 12:19 PM, Robby Findler wrote:
>> I think that we are just throwing up stumbling blocks. It is really a
>> design choice (does a reprovide "carry over" the contract or does it
>> put a new one on there?) and I seriously doubt there are any places
>> where someone does a reprovide intending to change the contract in
>> this manner. To the contrary, I expect that nearly every place where
>> someone does a reprovide, they indented to use the exact same contract
>> (with different parties now).
> 
> This is possible, but _which_ parties?  Do you wish to export internals through an external interface that should now take on the positive blame, so that you don't leak your internals (via module names and such used as blame parties)?  This seems to me what you'd want for something like redex, but this requires more work, since you need to change the positive blame.  This would require reapplying the contract projection to the original (pre-wrapped) value but different blame parties, which is more expensive and thus should be explicit, or some thought into how to engineer the contract system to make this possible without needing to reapply the projection.

Actually, if this is only allowed before the value is used (i.e. on straight reprovides of a contracted identifier), then we might be able to store some syntax-time information and recreate the syntax transformer appropriately.  So perhaps it wouldn't be as expensive as I originally thought, though it still seems that changing the positive blame information should be an explicit operation, and I think it's really what you want here.  I'll keep thinking about this, though.

Stevie

Posted on the dev mailing list.