[racket] procedure, contract, assoc, and REPL

From: YC (yinso.chen at gmail.com)
Date: Thu Jul 22 15:24:44 EDT 2010

On Thu, Jul 22, 2010 at 4:58 AM, Robby Findler <robby at eecs.northwestern.edu>
 wrote:

>

The way the contract system creates the wrappers is a bit subtle. In
> general, it needs to create at least one wrapper object per module
> that uses the procedure so it tries to create at most one as well, but
> in the REPL it cannot do that, so it creates one wrapper per use of
> the variable. (The reason it needs at least one per module that uses
> the procedure is for proper blame assignment. If two modules, say A
> and B, both use the contracted function, then either module might be
> blamed, so one wrapper function has an "A" somewhere inside the other
> has a "B".)
>
>
Ah I see why they do not eq each other now.  This is indeed quite subtle.
 My thought has always been that the exported contract function in module A
is the same exported contract function in module B, and they magically know
where they are being invoked, instead of having two separate wrappers.

Thanks for the explanation Robby.  I will see what I can do with this.

Cheers,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100722/de2a0646/attachment.html>

Posted on the users mailing list.