<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Does this help: </div><div><br></div><div><div>(define-values (case1_x case1_y case1_z case1_w) </div><div>  ((inst time-apply Integer Integer) (lambda () 10) '()))</div><div><br></div><div>(define-values (case2_x case2_y case2_z case2_w) </div><div>  ((inst time-apply Integer Integer) (lambda (x) 10) '(10)))</div><div><br></div><div>(define-values (case3_x case3_y case3_z case3_w) </div><div>  ((inst time-apply Integer String String) (lambda (x y) 10) '("hello" "world")))</div></div><div><br></div><div><br></div><br><div><div>On Feb 16, 2014, at 9:53 AM, Bloch Stephen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OK, I figured out an annotation to get vector-map to work.  Now I'm trying to use time-apply, and I don't understand why it's not type-checking.<div><br></div><div><div>> (:print-type time-apply)</div><div><br></div><div>(All (b a ...) (case-> ((-> b) Null -> (values (List b) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer))</div><div>        ((a ... a -> b) (List a ... a) -> (values (List b) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer))))</div><div><br></div><div>> (define-type A Integer) ; or whatever</div><div><br></div><div>> (define-type B String)</div><div><br></div><div>> (ann time-apply ((A A -> B) (List A A) -> (Values (List B) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer)))</div><div><br></div><div>. Type Checker: Expected ((Integer Integer -> String) (List Integer Integer) -> (values (List String) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer)), but got (All (b a ...) (case-> ((-> b) Null -> (values (List b) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer)) ((a ... a -> b) (List a ... a) -> (values (List b) Nonnegative-Integer Nonnegative-Integer Nonnegative-Integer)))) in: time-apply</div></div><div><br></div><div>Why doesn't the type I gave it match the second case of time-apply's type?</div><br><br><div>
<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Stephen Bloch</div><div><a href="mailto:sbloch@adelphi.edu">sbloch@adelphi.edu</a></div></div></span>GPG  key at <a href="http://adelphi.edu/sbloch/sbloch.pubkey.asc">http://adelphi.edu/sbloch/sbloch.pubkey.asc</a>
</div>
<br></div>____________________<br>  Racket Users list:<br>  <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></blockquote></div><br></body></html>