declare empty namespace for submodules

Using the enclosing module's context for the `#f` part of the
`(module* _ #f ....)` would generally enable a compact encoding of
bindings for the purposes of `module->namespace`. Disabling
`module->namespace` for the generated submodules seems more reliable,
and it seems unlikely that anyone will miss the extra debugging
capability (which is all that is lost for these submodules whose
content is, I think, unspecified).
This commit is contained in:
Matthew Flatt 2015-03-16 17:27:27 -06:00
parent aec5fad4be
commit 2f00de99d0
2 changed files with 4 additions and 1 deletions

View File

@ -100,6 +100,7 @@
(begin-for-syntax
(module* #%type-decl #f
(#%plain-module-begin ;; avoid top-level printing and config
(#%declare #:empty-namespace) ;; avoid binding info from here
(require typed-racket/types/numeric-tower typed-racket/env/type-name-env
typed-racket/env/global-env typed-racket/env/type-alias-env
typed-racket/types/struct-table typed-racket/types/abbrev

View File

@ -407,6 +407,7 @@
(begin-for-syntax
(module* #%type-decl #f
(#%plain-module-begin ;; avoid top-level printing and config
(#%declare #:empty-namespace) ;; avoid binding info from here
(require typed-racket/types/numeric-tower typed-racket/env/type-name-env
typed-racket/env/global-env typed-racket/env/type-alias-env
typed-racket/types/struct-table typed-racket/types/abbrev
@ -469,8 +470,9 @@
;; itself) at the runtime of typed modules that don't need
;; them. This is similar to the reason for the
;; `#%type-decl` submodule.
(module* #%contract-defs #f
(module* #%contract-defs #f
(#%plain-module-begin
(#%declare #:empty-namespace) ;; avoid binding info from here
#,extra-requires
new-defs ...)))
#`(begin