#lang typed/racket<br><br>(provide x)<br><br>(module M typed/racket<br> (provide x)<br> (define: x : Natural 3))<br><br>(require (submod "." M))<br><br>;; end-of-file<br><br>Submodules don't work in TR (at least the above variation). I added a few debug statements and it does appear the when requiring a submodule defined within the enclosing file it fact TR attempts to dynamic-require the current source file/module again.<br>
<br>i.e. It fails to recognize that referenced submodule is _not_ in an external source file file, but is defined within the current source/module.<br><br>I pointed out awhile back and I sort of got the impression that there was something foundationally deeper that the core team was going to have to address. But it seems a fix would be something along the lines of 'don't (re)dynamic-require a submodule path with a "." in it '.<br>
<br>Has anyone had a chance to look into this yet? I'd love to use submodules in TR.<br><br>Thanks,<br><br>Ray<br>