[racket] Pattern matching on structures defined using make-struct-type
Hi,
is it possible to use patterns like (struct struct-id (pats)) to match
structures which are defined with make-struct-type?
Example:
(define-values (s:tuple make-tuple tuple? tuple-ref tuple-set!)
(make-struct-type 'tuple #f 1 0 #f))
(match (make-tuple (vector 'a))
[(struct tuple (a)) a])
gives the error "match: tuple does not refer to a structure definition in:
tuple"
Thanks,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110220/33a90df4/attachment.html>