[plt-scheme] Typed scheme and curry

From: Scott McLoughlin (scott at adrenaline.com)
Date: Fri Dec 19 18:03:09 EST 2008

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,
>   



Posted on the users mailing list.