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

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Wed Aug 7 11:49:55 EDT 2013

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

Posted on the users mailing list.