[racket-dev] typed/racket for loops?

From: Hari Prashanth (krhari at ccs.neu.edu)
Date: Tue Jun 7 15:24:56 EDT 2011

Its a bad error message I believe.

(: p (Listof Fixnum))
(define p 
  (for/list: : (Listof Fixnum) ([i : Fixnum (in-range 30)]) i))


----- Original Message -----
From: "John Clements" <clements at brinckerhoff.org>
To: "Sam Tobin-Hochstadt" <samth at ccs.neu.edu>
Cc: "dev" <dev at racket-lang.org>
Sent: Tuesday, June 7, 2011 3:10:58 PM (GMT-0500) Auto-Detected
Subject: [racket-dev] typed/racket for loops?

I can't get typed racket to work with for loops, e.g.:

#lang typed/racket

(: p (Listof Natural))
(define p 
  (for/list: : Natural ([i (in-range 30)]) i))

==> Type Checker: Error in macro expansion -- untyped variable: for-loop in: (for/list: : Natural ((i (in-range 30))) i)


Am I doing something silly here? I tried annotating the type of the loop variable 'i', with no change in the error message.

John


_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Posted on the dev mailing list.