[racket] Typed Racket bug
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:
Definitions window:
#lang typed/racket
(: listify (All (a ...) (a ... a -> (List a ... a))))
(define (listify . xs) xs)
Interactions window:
Welcome to DrRacket, version 5.0.1 [3m].
Language: typed/racket; memory limit: 128 MB.
> listify
- : (All (a ...) (a ... a -> (List a ... a)))
#<procedure:listify>
> (listify 1 "hello" #\c)
- : (List Char String Positive-Fixnum)
'(1 "hello" #\c)
>
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.
-Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100812/dc602ef4/attachment.html>