[plt-scheme] re-providing a contract

From: Robby Findler (robby at cs.uchicago.edu)
Date: Mon Apr 14 23:19:40 EDT 2008

Can you change the original program to export the contracts and then
just re-use them?


On Mon, Apr 14, 2008 at 9:54 PM, Doug Orleans <dougorleans at gmail.com> wrote:
> Robby Findler writes:
>   > There is not a way to get the contract of a procedure (indeed, I'd say
>   > that there is no such thing as "the" contract of a procedure from the
>   > perspective that one could have many different contracts that all
>   > assign blame the same way in the same sense that there are many
>   > functions that produce the same results). But the contract should
>   > always be part of the documentation so you should know what you've
>   > got, even if you can't program with it per se.
>  If I'm writing a plug-in replacement for a module, and that module
>  changes some of its contracts, then I have to change my contracts to
>  match, even if I'm just doing `(define (my-f . args) (apply f args))'.
>  It seems like I should be able to say "don't blame me, blame the
>  caller" for functions like these, without having to explicitly
>  duplicate the imported contract of `f' for `my-f'.
>  --dougorleans at gmail.com

Posted on the users mailing list.