This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 449: Clarify library loading rules

2012-10-09 21:58:22
WG1 - Core
cowan
major
cowan
fixed
source
closed
2012-07-02 10:26:55
defect

R7RS currently says:

Within a program, each imported library is loaded at least once, and, if imported by more than one program or library, may possibly be loaded additional times.

Richard Kelsey thinks this is too liberal, and proposes:

Regardless of the number of times that a library is loaded, each program or library that imports bindings from a library will receive bindings from a single loading of that library, regardless of the number of import or cond-expand forms in which it appears.

Aaron Hsu, however, thinks this is too restrictive, and proposes (backed up by actual R6RS implementations):

If a library's definitions are referenced in the expanded form of a program or library body, then that library must be loaded before the expanded program or library body is evaluated. This rule applies transitively.

Similarly, during the expansion of a library, if a syntax keyword imported from a library is needed to expand the library, then the imported library must be visited before the expansion of the importing library.

statusnewdecided

WG1 voted to adopt Hsu's proposal.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed