reference: clarify significance of order for submodules

Merge to v6.1
(cherry picked from commit e044e4360b)
This commit is contained in:
Matthew Flatt 2014-07-10 13:16:57 +01:00 committed by Ryan Culpepper
parent adf9f50b73
commit c76fc74853
2 changed files with 13 additions and 1 deletions

View File

@ -822,6 +822,11 @@ imports from its enclosing module or vice-versa, then @tech{visits} or
@tech{instantiations} of the two modules are independent, and thier
implementations may even be loaded from bytecode at different times.
A submodule declared with @racket[module] can import any preceding
submodule declared with @racket[module]. A submodule declared with
@racket[module*] can import any preceding module declared with
@racket[module*] and any submodule declared with @racket[module].
When a submodule declaration has the form @racket[(module* _name #f
....)], then all of the bindings of the enclosing module's bodies are
visible in the submodule's body, and the submodule implicitly imports

View File

@ -332,7 +332,14 @@ Each addition for @racket[id] is combined in order to form the entire
submodule using @racket[(module* id #f ....)] at the end of the
enclosing module. If there is only one @racket[module+] for a given
@racket[id], then @racket[(module+ id form ...)] is equivalent to
@racket[(module* id #f form ...)].
@racket[(module* id #f form ...)], but still moved to the end of the
enclosing module.
When a module contains multiple submodules declared with
@racket[module+], then the relative order of the initial
@racket[module+] declarations for each submodule determines the
relative order of the @racket[module*] declarations at the end of the
enclosing module.
A submodule must not be defined using @racket[module+] @emph{and}
@racket[module] or @racket[module*]. That is, if a submodule is made