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. For a version of this page that may be more recent, see ReplSemanticsCowan in WG2's repo for R7RS-large.

Repl­Semantics­Cowan

cowan
2010-09-28 22:17:03
1history
source

REPL semantics

WG1 Scheme implementations SHOULD provide a REPL.

At startup, a REPL MUST import the core module and MAY import an implementation-defined list of other modules. Implementations SHOULD allow this list to be changed in advance.

A REPL MUST allow other modules to be imported using the same syntax as is used when one module imports another. Imports may be performed at any time during the life of the REPL. It is undefined how many times an imported module is instantiated.

Definitions and expressions to be evaluated MAY be intermixed freely. Identifiers and syntax keywords MAY be redefined, subject to the following rules:

A REPL MUST provide the syntax (include filename), which causes the declarations and expressions in filename to be processed exactly as if they had been input directly to the REPL.

A REPL MAY provide a means of loading modules or include files that have been compiled by a compiler associated with the implementation.