In the provided example, yes I'm seeing the stale zo issue. In my "real" code, each submodule also requires a common module as well and in this situation I get a cyclic require error as well when check-syntax is performed as well as the zo error at the bottom of DR. I don't know if there are two distinct issues or one domino-ing the other.<div>
<div><br><div class="gmail_quote">On Tue, Aug 28, 2012 at 12:27 PM, Sam Tobin-Hochstadt <span dir="ltr"><<a href="mailto:samth@ccs.neu.edu" target="_blank">samth@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, Aug 28, 2012 at 12:23 PM, Eric Dobson <<a href="mailto:eric.n.dobson@gmail.com">eric.n.dobson@gmail.com</a>> wrote:<br>
> Possibly, how is it not working for you?<br>
><br>
> With:<br>
> #lang typed/racket/base<br>
><br>
> (module mytypes racket/base<br>
><br>
> (provide S)<br>
><br>
> (struct S ()))<br>
><br>
> (module tyuser racket/base<br>
><br>
> (require<br>
> (submod ".." mytypes))<br>
><br>
> (define (mkS value)<br>
> (S)))<br>
><br>
> (note submodules are now in plain racket)<br>
><br>
><br>
> I get:<br>
> tmp.rkt:17:5: link: module mismatch;<br>
> possibly, bytecode file needs re-compile because dependencies changed<br>
> importing module: 'tyuser<br>
> exporting module: 'tmp<br>
> exporting phase level: 0<br>
> internal explanation: variable not provided (directly or indirectly)<br>
> at: make-S<br>
> in: make-S.1<br>
> context...:<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:308:0: compile-zo*<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:508:26<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:501:42<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:466:0:<br>
> maybe-compile-zo<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:579:2: do-check<br>
> /Users/endobson/proj/racket/plt/collects/compiler/cm.rkt:653:4<br>
> /Users/endobson/proj/racket/plt/collects/compiler/commands/make.rkt:77:8:<br>
> for-loop<br>
> /Users/endobson/proj/racket/plt/collects/compiler/commands/make.rkt:<br>
> [running body]<br>
> /Users/endobson/proj/racket/plt/collects/raco/raco.rkt: [running body]<br>
> /Users/endobson/proj/racket/plt/collects/raco/main.rkt: [running body]<br>
><br>
> Which looks like a bug in TR handling of submodules.<br>
<br>
</div></div>I believe that this is a bug in Racket, although I'm not sure. You<br>
can see a simpler example here:<br>
<a href="http://drdr.racket-lang.org/25284/collects/tests/typed-racket/succeed/internal-typed-submod.rkt" target="_blank">http://drdr.racket-lang.org/25284/collects/tests/typed-racket/succeed/internal-typed-submod.rkt</a><br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> On Tue, Aug 28, 2012 at 7:32 AM, Ray Racine <<a href="mailto:ray.racine@gmail.com">ray.racine@gmail.com</a>> wrote:<br>
>> The following does not work. Bug?<br>
>><br>
>> #lang typed/racket/base<br>
>><br>
>> (module mytypes typed/racket/base<br>
>><br>
>> (provide<br>
>> (struct-out S))<br>
>><br>
>> (struct: S ()))<br>
>><br>
>> (module tyuser typed/racket/base<br>
>><br>
>> (require<br>
>> (submod ".." mytypes))<br>
>><br>
>> (: mkS (Any -> S))<br>
>> (define (mkS value)<br>
>> (S)))<br>
>><br>
>> ____________________<br>
>> Racket Users list:<br>
>> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
>><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
sam th<br>
<a href="mailto:samth@ccs.neu.edu">samth@ccs.neu.edu</a><br>
</font></span></blockquote></div><br></div></div>