<div><br></div>I've found a bug in Typed Racket's handling of (List t0 ...) types -- at least, when they appear on the right hand side of the -> type constructor and involve ellipsis patterns with type variables. Here is a simple example demonstrating the problem:<div>
<br><div>Definitions window:</div></div><div><br></div><div><div>#lang typed/racket</div><div><br></div><div>(: listify (All (a ...) (a ... a -> (List a ... a))))</div><div>(define (listify . xs) xs)</div></div><div><br>
</div><div><br></div><div>Interactions window:</div><div><br></div><div><div>Welcome to DrRacket, version 5.0.1 [3m].</div><div>Language: typed/racket; memory limit: 128 MB.</div><div>> listify</div><div>- : (All (a ...) (a ... a -> (List a ... a)))</div>
<div>#<procedure:listify></div><div>> (listify 1 "hello" #\c)</div><div>- : (List Char String Positive-Fixnum)</div><div>'(1 "hello" #\c)</div><div>> </div></div><div><br></div><div><br>
</div><div>As you can see, the result of (listify 1 "hello" #\c) is correct, but the result's type is incorrect; the types of the list members are reversed.</div><div><br></div><div>-Jon</div><div><br></div>