[racket-dev] typed/racket for loops?

From: John Clements (clements at brinckerhoff.org)
Date: Tue Jun 7 18:49:05 EDT 2011

On Jun 7, 2011, at 12:24 PM, Hari Prashanth wrote:

> Its a bad error message I believe.
> (: p (Listof Fixnum))
> (define p 
>  (for/list: : (Listof Fixnum) ([i : Fixnum (in-range 30)]) i))

In that case, it appears that there's also a doc bug; the docs say:

(for/list: : u (for:-clause ...) expr ...+)

... "The last expr of the body must have type u."

This would suggest that the type annotation used for 'u' above should be Fixnum, not (Listof Fixnum).  Are the docs correct, or is the implementation?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20110607/900de75b/attachment.p7s>

Posted on the dev mailing list.