Thank you,

Bert

________________________________
From: Sam Tobin-Hochstadt <sa...@cs.indiana.edu>
Sent: Monday, November 25, 2019 15:12
To: bedeke <bed...@hotmail.com>
Cc: Racket Users <racket-users@googlegroups.com>
Subject: Re: [racket-users] type-checking error with immutable vectors in for 
loop

This is a situation where the problem is needing more annotations --
if you write:

(for/list : (Listof M)
  ([m : M s])
  m)

it type checks.

Sam

On Mon, Nov 25, 2019 at 3:27 AM bedeke <bed...@hotmail.com> wrote:
>
> Hello,
>
> the following doesn't typecheck. Is it a bug? Should I avoid 
> Immutable-Vectors?
> #lang typed/racket/base
> ;DrRacket, version 7.5.0.3 [3m].
>
> (require racket/sequence)
>
> (define-type M (Immutable-Vectorof Number))
>
> (define s
>   (in-list (ann (list (vector-immutable 1 2 3)
>                       (vector-immutable 2 3 4)
>                       (vector-immutable 3 4 5))
>                 (Listof M))))
>
> (for/list : (Listof M)
>   ([m s])
>   m)
>
> Kr,
> Bert
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/1b1bc126-61d4-476f-bbfd-2bb7fce20aae%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/AM6PR05MB5523EA947F74F924E65F7231C74A0%40AM6PR05MB5523.eurprd05.prod.outlook.com.

Reply via email to