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 160: Interleaving of imports and code in a module

2012-10-09 21:34:15
WG1 - Modules
alexshinn
major
cowan
fixed
source
closed
2011-04-24 06:22:19
defect

Given

(module (name) (begin c1 ...) (import (A)) (begin c2 ...) (import (B)) (begin c3 ...))

what environments are c1, c2, c3 evaluated in? Two possibilities: all three are evaluated in an environment jointly composed of the (A) and (B) imports, or c1 is evaluated in the empty environment, c2 in the (A) environment, and only c3 in the joint environment.

resolution
statusnewdecided

We voted that all imports are independent of code, and are established before any code is expanded.

statusdecidedwriting
resolutionfixed
statuswritingclosed

This was overridden in part later to specify that use before import is an error.