[plt-scheme] srfi/1 messes typed-scheme
That's the nest step.
And the third step is to find an analysis of the contract language
that separates them into statically checkable parts and dynamic parts.
That's the long term vision.
Sam proposed a "5 year" plan vision (he's a lefty :-) for the August
PLT day/afternoon, and I have been paging back in my "big picture"
ideas from the past years.
-- Matthias
On Apr 2, 2009, at 1:13 PM, Robby Findler wrote:
> 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
>>