To begin with: I was surprised and elated to discover that typed racket handles list comprehensions!
Now: the error I get on this code looks very much like a bug: #lang typed/racket (: tag->num-table (HashTable Symbol Integer)) (define tag->num-table (for/hash ([t (in-list '(a b c))] [i (in-naturals)]) (values t i))) ... yields this error text: Welcome to DrRacket, version 5.1.1.5--2011-05-24(dcb5e89/g) [3m]. Language: typed/racket [custom]; memory limit: 256 MB. . Type Checker: Polymorphic function hash-set could not be applied to arguments: Argument 1: Expected: (HashTable a b) Given: (HashTable Integer Integer) Argument 2: Expected: a Given: (U 'a 'b 'c) Argument 3: Expected: b Given: Integer in: (for/hash ((t (in-list (quote (a b c)))) (i (in-naturals))) (values t i)) . Type Checker: Expected (HashTable Symbol Integer), but got (HashTable Integer Integer) in: (for/hash ((t (in-list (quote (a b c)))) (i (in-naturals))) (values t i)) . Type Checker: Summary: 2 errors encountered in: (for/hash ((t (in-list (quote (a b c)))) (i (in-naturals))) (values t i)) (for/hash ((t (in-list (quote (a b c)))) (i (in-naturals))) (values t i)) The suspicious thing here is that typed racket believes that this hash table maps Integers to Integers, rather than Symbols to Integers; I can't see any part of my code that would lead to this assumption. John
smime.p7s
Description: S/MIME cryptographic signature
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/dev

