On Jun 13, 2015, at 12:18 AM, 'John Clements' via users-redirect 
<[email protected]> wrote:

> Okay, I shouldn’t change topics, but while I’ve got you (guys): it looks like 
> (module+ test …) now works in TR, but not when there are imported bindings… 
> suppose I have foo.rkt:

I’ve run into similar problems with module+ before as you did below, but I 
found that something like this has worked so far:
(module* test racket/base
  (require (submod “..”) rackunit)
  … tests here …
  )

But anyway, I think I remember asking on the list and it being some problem 
with, and it might have been a problem with it being confused about whether the 
tests were typed or untyped?
http://lists.racket-lang.org/users/archive/2014-July/063668.html
http://lists.racket-lang.org/users/archive/2014-July/063669.html
http://lists.racket-lang.org/users/archive/2014-July/063670.html

But some time after that I found that (module* test racket/base …) worked.

> #lang typed/racket
> 
> (provide [struct-out Z])
> 
> (define-struct Z ([a : Number]))
> 
> … and then try to import it in a test+:
> 
> #lang typed/racket
> 
> (require "foo.rkt")
> 
> (Z 3)
> 
> (module+ test
>  (Z 3))
> 
> this leads to this error message:
> 
> Type Checker: missing type for identifier;
> consider using `require/typed' to import it
>  identifier: make-Z
>  from module: (submod foo.rkt #%contract-defs-reference .. #%contract-defs) 
> in: make-Z
> 
> I tried various require/typed combinations, but only managed to get an error 
> on `make-Z1`, which doesn’t sound like forward progress.
> 

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to