[racket] Typed Racket and require/typed for polymorphic structs
That doesn't solve the issue. The issue is not in struct/c and thus
using struct/dc has the same problem. A immutable field cannot have a
impersonator contract applied to it because that would be equivalent
to mutating the field.
On Wed, Aug 7, 2013 at 8:49 AM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
> On 2013-08-07 08:42:53 -0700, Eric Dobson wrote:
>> What is (posn X Y)? If you mean the obvious (struct/c posn X Y) you
>> will run into issues with the fact that posn is immutable and
>> therefore the contracts on its fields need to be flat or chaperone
>> contracts, and parametric contracts are not.
>
> How about something like:
> (struct/dc posn [x () #:impersonator X]
> [y () #:impersonator Y])
>
> Cheers,
> Asumu