On 4/25/14, 9:38 PM, Alexander D. Knauth wrote:
> Is there a way of specifying types for fields in non-polymorphic structures?  
> Like this:
> (struct: posn ([x : Real] [y : Real]))
> (define-type Origin
>   (posn Zero Zero))
> I know this doesn’t work, but is there something that could work like it?

How about this?

(struct: (x y) posn ([x : x] [y : y]))
(define-type Posn (posn Real Real))
(define-type Origin (posn Zero Zero))


____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to