[plt-scheme] Typed scheme and curry
Roger that.
Scott
Matthias Felleisen wrote:
>
> Scott, you're right in that TS should provide better error messages.
> However, the claim below is entirely irrelevant. In Haskell and ML,
> curried functions are a part of the core language and thus are
> integrated into the core system. In Scheme, you are importing a
> function for currying from the untyped world into the typed one and
> THAT is an unsolved problem -- also for Haskell and ML. Indeed, they
> don't even try to create a type system for moving from a "bad" world
> to a "good" one. They just assume that you always program in a "good"
> world. -- Matthias
>
>
>
>
>
> On Dec 19, 2008, at 6:03 PM, Scott McLoughlin wrote:
>
>> FWIW, strongly typed languages like Haskell and ML have curried
>> functions. The typing
>> isn't very complicated at all.
>>
>> fun fubar (a : Int) (b : Str) (c : Dbl) : Str = blah blah blah;
>>
>> fubar 1;
>> => fn(Str, Dbl): Str
>>
>> k = fubar 1 "Hello";
>> => k : fn(Dbl) : Str
>>
>> k 3.4;
>> => _ : "1 Hello 3.4"
>>
>> Or whatever depending upon the function definition. Point is that
>> currying loses no type information.
>>
>> Scott
>>
>>
>> Sam TH wrote:
>>> On Fri, Dec 19, 2008 at 4:33 PM, Scott McLoughlin
>>> <scott at adrenaline.com> wrote:
>>>
>>>> I can require scheme/function and immediately get some trivial
>>>> examples of
>>>> curry to work. But when I try the same thing in Typed Scheme, I
>>>> get various
>>>> errors instead.
>>>>
>>>
>>> What errors did you get? What type did you supply for `curry'?
>>>
>>>
>>>> Is there a straightforward set of practices to get curry to work
>>>> within
>>>> Typed Scheme?
>>>>
>>>
>>> No, as Carl said, `curry' is not feasible to describe with the Typed
>>> Scheme type system (or any other that I know of).
>>>
>>> Thanks,
>>>
>>
>> _________________________________________________
>> For list-related administrative tasks:
>> http://list.cs.brown.edu/mailman/listinfo/plt-scheme