<div><br></div>I&#39;ve found a bug in Typed Racket&#39;s handling of (List t0 ...) types -- at least, when they appear on the right hand side of the -&gt; 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 -&gt; (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>&gt; listify</div><div>- : (All (a ...) (a ... a -&gt; (List a ... a)))</div>
<div>#&lt;procedure:listify&gt;</div><div>&gt; (listify 1 &quot;hello&quot; #\c)</div><div>- : (List Char String Positive-Fixnum)</div><div>&#39;(1 &quot;hello&quot; #\c)</div><div>&gt; </div></div><div><br></div><div><br>
</div><div>As you can see, the result of (listify 1 &quot;hello&quot; #\c) is correct, but the result&#39;s type is incorrect; the types of the list members are reversed.</div><div><br></div><div>-Jon</div><div><br></div>