#lang typed/racket

(provide x)

(module M typed/racket
  (provide x)
  (define: x : Natural 3))

(require (submod "."  M))

;; end-of-file

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.

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.

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 '.

Has anyone had a chance to look into this yet?  I'd love to use submodules
in TR.

Thanks,

Ray
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to