[plt-scheme] srfi/1 messes typed-scheme

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Thu Apr 2 20:59:55 EDT 2009

On Thu, Apr 2, 2009 at 6:22 PM, Sam TH <samth at ccs.neu.edu> wrote:
> On Thu, Apr 2, 2009 at 2:09 PM, Paulo J. Matos <pocmatos at gmail.com> wrote:
>> On Thu, Apr 2, 2009 at 4:31 PM, Sam TH <samth at ccs.neu.edu> wrote:
>>> SRFI 1 provides `map', which overrides the `map' provided from
>>> `typed-scheme'.  That `map' doesn't have a type associated with it,
>>> and you didn't specify one with `require/typed', so you get the error
>>> you see.
>>>
>>> If you want to use a procedure from SRFI 1, or any other untyped
>>> library, you need to use `require/typed'.
>>>
>>
>> I see, so I can just require/typed every from srfi/1 and provide a type.
>> Now,
>> if I do
>> (require/typed srfi/1
>>               every (All (a) (((a * -> Boolean) (Listof a) * -> Boolean))))
>>
>
> Your syntax for `require/typed' is wrong.  You mean:
>
> (require/typed srfi/1
>              [every (All (a) (((a * -> Boolean) (Listof a) * -> Boolean)))])
>
> plus I think your type syntax is wrong as well.  Note that the ability
> to use `require/typed' with polymorphic types is very new, and may not
> work right yet.  I'll be posting something about this soon.
>

So the reason why this fails:
(require/typed srfi/1
               (every (All (a) (((a * -> Boolean) (Listof a) * -> Boolean)))))

 with
typecheck: not a valid type: (((a * -> Boolean) (Listof a) * ->
Boolean)) in: (((a * -> Boolean) (Listof a) * -> Boolean))

or a problem with unsupported polymorphic types in require/typed?


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


Posted on the users mailing list.