[plt-scheme] match doesn't recognize struct if typed

From: Sam TH (samth at ccs.neu.edu)
Date: Thu Apr 9 13:04:14 EDT 2009

On Thu, Apr 9, 2009 at 12:08 PM, Paulo J. Matos <pocmatos at gmail.com> wrote:

>
> I get:
> match: foo does not refer to a structure definition in: foo
>
> What's the issue here. if foo.scm was not typed, then everything would
> be fine. Am I missing something?
> I would think that if I require a typed module from an untyped one
> there would be no problem whatsoever and I would just have a contract
> check on module boundary.

In general, a typed module cannot provide syntax bindings to an
untyped module, because this could allow access to the values of the
typed module without the contract checking.  The static information
about struct types is such a syntax binding, and thus isn't provided
to the untyped module.

It might be possible to do something special for struct information,
but I'm not sure.
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.