[racket] Re: Serializable Structs and Contracts

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Sun Jun 6 16:22:31 EDT 2010

It seems this is a bug. Lead to this conclusion after inspecting snooze
source code. Bug was reported as: 10963

Cheers,

Paulo Matos

pocmatos at gmail.com (Paulo J. Matos) writes:

> After playing a bit with serializable structs I just noticed that the
> usual contract on structs doesn't work:
> ,----
> | (define-serializable-struct point
> |   (x y))
> | 
> | (provide/contract
> |  [struct point ((x number?) (y number?))])
> `----
>
> generates:
> ,----
> | provide/contract: expected a struct name in: point
> `----
>
> Oh no! :-(
> Any way to have contracts over serializable structs? Looking at the docs
> didn't provide much help. I am running 4.2.1. If nothing is implemented
> for this version, do new versions support contracts for
> serializable-structs?
>
> Cheers,

-- 
PMatos


Posted on the users mailing list.