[plt-scheme] Re: Type for Hash Tables

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Thu Mar 12 07:57:34 EDT 2009

On Thu, Mar 12, 2009 at 11:47 AM, Noel Welsh <noelwelsh at gmail.com> wrote:
> I guess you have to create a new opaque-type, as illustrated below.
>
> HTH,
> N.
>
> #lang typed-scheme
>
> (require/opaque-type hash hash? scheme/base)
> (require/typed scheme/base (make-hash (-> hash)))
>
> (define h (make-hash))
>

Great! Thanks for the example.

Paulo Matos

> On Thu, Mar 12, 2009 at 11:35 AM, Paulo J. Matos <pocmatos at gmail.com> wrote:
>>
>> Maybe I wasn't clear in my question:
>> In typed-scheme, how can I type a function which receives or returns
>> an hash-table, i.e.  what's the base type for hash tables?
>>
>



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


Posted on the users mailing list.