Re: [racket] applying polymorphic functions in TR

2014-02-16 Thread Bloch Stephen
On Feb 16, 2014, at 11:38 AM, Asumu Takikawa wrote: > On 2014-02-16 11:03:34 -0500, Asumu Takikawa wrote: >> It would be nice if inference were smart enough so that this worked: >> >> (time-apply (lambda: ([x : Integer] [y : Integer]) "foo") '(1 2)) > > I just pushed a fix to HEAD that makes t

Re: [racket] applying polymorphic functions in TR

2014-02-16 Thread Asumu Takikawa
On 2014-02-16 11:03:34 -0500, Asumu Takikawa wrote: > It would be nice if inference were smart enough so that this worked: > > (time-apply (lambda: ([x : Integer] [y : Integer]) "foo") '(1 2)) I just pushed a fix to HEAD that makes type inference work for this example. Should also help other fun

Re: [racket] applying polymorphic functions in TR

2014-02-16 Thread Matthias Felleisen
Does this help: (define-values (case1_x case1_y case1_z case1_w) ((inst time-apply Integer Integer) (lambda () 10) '())) (define-values (case2_x case2_y case2_z case2_w) ((inst time-apply Integer Integer) (lambda (x) 10) '(10))) (define-values (case3_x case3_y case3_z case3_w) ((inst

Re: [racket] applying polymorphic functions in TR

2014-02-16 Thread Asumu Takikawa
On 2014-02-16 09:53:21 -0500, Bloch Stephen wrote: >> (define-type A Integer) ; or whatever >> (define-type B String) >> (ann time-apply ((A A -> B) (List A A) -> (Values (List B) >Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer))) You probably want `inst` here instead,