[plt-scheme] re-providing a contract

From: Doug Orleans (dougorleans at gmail.com)
Date: Mon Apr 14 22:54:35 EDT 2008

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.