[racket-dev] Blame and re-provided bindings

From: Stevie Strickland (sstrickl at ccs.neu.edu)
Date: Sat Jan 15 13:26:06 EST 2011

On Jan 15, 2011, at 1:24 PM, Robby Findler wrote:
> On Sat, Jan 15, 2011 at 12:22 PM, Stevie Strickland
> <sstrickl at ccs.neu.edu> wrote:
>> On Jan 15, 2011, at 1:19 PM, Matthias Felleisen wrote:
>>> 2. I am not strictly opposed to your suggestion because I see value in your reasoning. If we go with re-providing the identifier with its contract, I would like to see the blame assignment shifted to the re-exporting module. This does leave us with the "Carl" question:
>>> 
>>> who is going to be blamed when module C imports f from A and (re-provided from) B?
>> 
>> It'll be a syntax error.  There's no way to change the positive blame information for the contract form that an identifier will expand into without changing the binding information.  That's why it'd have to be an explicit operation, even if it's inexpensive because the work is done at syntax time (just changing the syntax transformer) and not trying to recontract the already contracted value with new blame information.
> 
> This is not a syntax error at the moment and already something that can happen.
> 
> In particular, if I call 'f' with the wrong arguments, it may or may
> not say "via B" in the error message.

That's the user blame changing, _not_ the positive blame.  I assumed that Matthias meant that he'd like to see the _positive_ blame shifted to the re-exporting module, which would cause the issue.

Stevie

Posted on the dev mailing list.