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

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Apr 2 13:13:31 EDT 2009

Why not allow requires of modules that have contracts (perhaps in a
sublanguage of the contract language that correspond to TS types) too?

Robby

On Thu, Apr 2, 2009 at 12:11 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> The error message is clearly uninformative and unhelpful, which points out
> that in some sense a plain require shouldn't work at all in TS modules
> UNLESS they refer to a typed module. -- Matthias
>
>
>
>
> On Apr 2, 2009, at 12:31 PM, Sam TH 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'.
>>
>> 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
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.