[racket] An error with dates and types

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sun Aug 21 13:16:39 EDT 2011

You shouldn't be able to use plain require in Typed Racket. 

Try this: 

#lang typed/racket
(require/typed racket/date (date->seconds (date -> Natural)))
(date->seconds (seconds->date (current-seconds)))


On Aug 21, 2011, at 11:06 AM, Norman Gray wrote:

> 
> Greetings.
> 
> Another typed-racket problem, I'm afraid.
> 
> With the following script, I get an error message from Typed Racket which is not, I think, really addressed to me.
> 
> (Is the list generally OK for straight bug reports?  There isn't a bug parade I should be posting this on, is there?)
> 
> All the best,
> 
> Norman
> 
> 
> % cat dates.rkt
> #lang typed/racket
> (require (only-in racket/date date->seconds))
> (date->seconds (seconds->date (current-seconds)))
> % "/Data/LocalApplications/Racket/5.1.3/bin/racket" dates.rkt
> for: expected a sequence for i, got something else: (tc-results (list (tc-result Variable-Reference (#0=Top | #0#) -)) #f)
> 
> === context ===
> /Data/LocalApplications/Racket/5.1.3/collects/racket/private/for.rkt:445:2: make-sequence
> /Data/LocalApplications/Racket/5.1.3/collects/typed-scheme/types/utils.rkt:103:2: ret
> temp871
> /Data/LocalApplications/Racket/5.1.3/collects/typed-scheme/typecheck/tc-expr-unit.rkt:201:4: loop
> /Data/LocalApplications/Racket/5.1.3/collects/racket/private/map.rkt:18:11: map
> parse-loop1141
> /Data/LocalApplications/Racket/5.1.3/collects/typed-scheme/typecheck/tc-expr-unit.rkt:330:0: tc-expr
> /Data/LocalApplications/Racket/5.1.3/collects/racket/private/map.rkt:18:11: map
> temp971
> /Data/LocalApplications/Racket/5.1.3/collects/typed-scheme/typecheck/tc-expr-unit.rkt:330:0: tc-expr
> /Data/LocalApplications/Racket/5.1.3/collects/racket/private/map.rkt:18:11: map
> temp971
> /Data/LocalApplications/Racket/5.1.3/collects/typed-scheme/typecheck/tc-expr-unit.rkt:330:0: tc-expr
> parse-loop26
> dots-loop
> /Data/LocalApplications/Racket/5.1.3/collects/racket/private/map.rkt:18:11: map
> ...
> 
> % 
> 
> 
> -- 
> Norman Gray  :  http://nxg.me.uk
> School of Physics and Astronomy, University of Glasgow, UK
> 
> 
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users




Posted on the users mailing list.