[racket-dev] Blame and re-provided bindings
The first problem is a variant of PR 11084, I think.
Ryan
On 01/14/2011 12:40 PM, Casey Klein wrote:
> The new, nicely formatted blame messages helped me discover that every
> single Redex contract has the wrong negative party. (Admittedly, the
> commonly used Redex provides are macros.) There are two problems.
>
> I believe the first is a bug. The following program (module
> dependencies DAG: http://pastebin.com/u9KMTnuP) blames d.rkt, even
> though the abused function never passes through its hands.
>
> a.rkt:
> #lang racket
> (require "b.rkt")
> (f 3.5)
>
> b.rkt:
> #lang racket
> (require "c.rkt" "d.rkt")
> (provide (all-from-out "c.rkt"))
>
> c.rkt:
> #lang racket
> (require "e.rkt")
> (provide/contract
> [f (-> integer? integer?)])
>
> d.rkt:
> #lang racket
> (require "c.rkt")
>
> e.rkt:
> #lang racket
> (define (f x) x)
> (provide f)
>
> The second problem is that, AFAIK, there's no convenient way to define
> a module b that combines the provides of two modules c and d. If b
> requires c and d and provides values f and g using `all-from-out',
> then b, not the module that requires it, becomes the negative party on
> the f and g contracts.
>
> a.rkt:
> #lang racket
> (require "b.rkt")
> (f 3.5)
>
> b.rkt:
> #lang racket
> (require "c.rkt" "d.rkt")
> (provide (all-from-out "c.rkt" "d.rkt"))
>
> c.rkt:
> #lang racket
> (define (f x) x)
> (provide/contract
> [f (-> integer? integer?)])
>
> d.rkt:
> #lang racket
> (define (g x) x)
> (provide/contract
> [g (-> string? string?)])
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/dev