[racket] TR: can I type-check an in-range at (Sequenceof Byte)?

From: John Clements (clements at brinckerhoff.org)
Date: Mon Dec 19 18:02:11 EST 2011

This program

#lang typed/racket

(: seq (Sequenceof Byte))

(define seq (in-range 127))

...yields this error:

Type Checker: Expected (Sequenceof Byte), but got (Sequenceof Nonnegative-Fixnum) in: (define seq (in-range 127))

I'm wondering if there's a way to get (in-range 127) to type-check at the type (Sequenceof Byte). 

Naturally, I can make it typecheck by inserting a redundant "cond" at the point at which the values from the sequence are used.

John

-------------- 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/users/archive/attachments/20111219/3049aaf8/attachment.p7s>

Posted on the users mailing list.