[plt-dev] abstract contracts

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Sep 8 08:17:15 EDT 2009

On Tue, Sep 8, 2009 at 3:36 AM, Carl Eastlund<carl.eastlund at gmail.com> wrote:
> On Mon, Sep 7, 2009 at 7:01 PM, Jacob Matthews<jacobm at cs.uchicago.edu> wrote:
>> On Sun, Sep 6, 2009 at 3:14 PM, Robby
>> Findler<robby at eecs.northwestern.edu> wrote:
>>> Right. That wouldn't be parametric.
>>
>> I think it's the contracts-don't-change-programs condition, not the
>> parametricity condition, that would be violated here.
>>
>> -jacob
>
> Don't these contracts already change the program?  I thought, since
> Robby indicated that "stacks" cannot be used as lists, these contracts
> would be wrapping the values in opaque structs for outside observers.
> Adding or removing the contracts changes how a list-implemented stack
> responds to list?.  Or have I misunderstood the behavior of #:exists
> contracts?

You have understood. list? is a problem. It should blow up on these
contracts and, if you use the scheme/exists language (as mentioned in
the docs I pointed to) it would blow up.

Robby


Posted on the dev mailing list.