[plt-scheme] srfi/1 messes typed-scheme
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))))
I get:
All: not a require sub-form in: (All (a) (((a * -> Boolean) (Listof a)
* -> Boolean)))
but even if it worked... problem is that every has to receive a
procedure with as many arguments as lists... is this possible to
specify or is it not up to the type to specify this?
Cheers,
Paulo Matos
> sam th
>
> On Thu, Apr 2, 2009 at 11:45 AM, Paulo J. Matos <pocmatos at gmail.com> wrote:
>> Hi all,
>>
>> Why is this failing:
>> #lang typed-scheme
>>
>> (require srfi/1)
>>
>> (: test-map ((Listof Number) -> (Listof Number)))
>> (define (test-map lst)
>> (map (lambda: ((x : Number)) (* x x)) lst))
>>
>> typecheck: unbound identifier map in: map
>>
>> Without the require it works. Obviously this is a short example and I
>> don't need the require but on a bigger example I need every from srfi1
>> so I do need to require srfi/1 but then it claims map is an unbound
>> identifier.
>>
>> Cheers,
>>
>> --
>> Paulo Jorge Matos - pocmatos at gmail.com
>> Webpage: http://www.personal.soton.ac.uk/pocm
>> _________________________________________________
>> For list-related administrative tasks:
>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>
>
>
> --
> sam th
> samth at ccs.neu.edu
>
--
Paulo Jorge Matos - pocmatos at gmail.com
Webpage: http://www.personal.soton.ac.uk/pocm