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

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Thu Apr 9 14:15:29 EDT 2009

On Thu, Apr 9, 2009 at 5:04 PM, Sam TH <samth at ccs.neu.edu> wrote:
> 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.

OK, thanks for letting me know. It would be good to enable this kind
of sharing though.
If I have module A that provides structures and functions over these
structures in typed-scheme and module B which is untyped because some
of the features used are not yet supported by typed-scheme then I
cannot use A in B and it makes me untype A till typed-scheme supports
all features in scheme.

By the way, do you envisage that in the future typed-scheme will
support everything provided by PLT Scheme or there will be always
things that won't be possible to type?

Cheers,

Paulo Matos

Cheers,

Paulo Matos

> --
> sam th
> samth at ccs.neu.edu
>



-- 
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm


Posted on the users mailing list.