[racket] weird error with typed racket, submodules, and math/array

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Fri Aug 1 16:49:59 EDT 2014

Hmm, that's odd. I do remember that workaround working at some point,
but maybe it doesn't anymore.

In the meantime, not using submodules with TR sounds like the best
solution.

Vincent


At Thu, 31 Jul 2014 21:39:38 -0400,
Alexander D. Knauth wrote:
> 
> [1  <text/plain; us-ascii (quoted-printable)>]
> I just tried that but got an even weirder error:
> #lang typed/racket
> (require math/array)
> (module+ test
>   (require math/array)
>   (require/typed math/array
>                  [unsafe-list->array (All (a) [Indexes (Listof a) -> (Array a)])])
>   (array #[#[#f #f #f]
>            #[#f #f #f]
>            #[#f #f #f]])
>   )
> ;unsafe-list->array2: unbound identifier;
> ; also, no #%top syntax transformer is bound in: unsafe-list->array2
> 
> On Jul 31, 2014, at 9:31 PM, Vincent St-Amour <stamourv at ccs.neu.edu> wrote:
> 
> > At Thu, 31 Jul 2014 19:48:31 -0400,
> > Alexander D. Knauth wrote:
> >> 
> >> And also I just curious, how does type checking work with module+ anyway?  
> > 
> > The short answer is that it doesn't work reliably.
> > 
> > There's a bug in the expander that affects (IIRC) how TR determines
> > whether a module is typed or not. Until that's fixed, TR thinks that
> > your submodule is untyped (at least as far as imports go).
> > 
> > A workaround that I've used is to use `require/typed` inside the
> > submodule.
> > 
> > Vincent
> 
> [2  <text/html; us-ascii (quoted-printable)>]
> 

Posted on the users mailing list.