[racket] Typed Racket and require/typed for polymorphic structs

From: Eric Dobson (eric.n.dobson at gmail.com)
Date: Wed Aug 7 11:18:41 EDT 2013

Ok, now I'm not so sure it is possible. Can you give what you think
the contracts should be for your posn example? The issue that I see is
that the parametricity is shared across different functions and I
don't know how that is represented with racket contracts.

On Wed, Aug 7, 2013 at 6:13 AM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> On 2013-08-06 21:53:14 -0700, Eric Dobson wrote:
>> I'm assuming you mean parametric contracts instead of polymorphic. But
>> not sure why those would be the correct solution, I think any/c would
>> work, I'm not seeing a case where wrapping the value would protect
>> anything.
>
> Yes, I mean parameteric contracts. I think you want parameteric
> contracts so that you know, for example, that a struct accessor is
> actually giving you the value you put in a struct instead of some random
> unrelated value.
>
> Cheers,
> Asumu

Posted on the users mailing list.