Next: scheme library form body, Previous: scheme library form version, Up: scheme library form [Index]
When more than one library is identified by a library reference, the choice of libraries is determined in some implementation–dependent manner.
To avoid problems such as incompatible types and replicated state, implementations should prohibit the two libraries whose library names consist of the same sequence of identifiers but whose versions do not match to co–exist in the same program.
By default, all of an imported library’s exported bindings are made
visible within an importing library using the names given to the
bindings by the imported library. The precise set of bindings to be
imported and the names of those bindings can be adjusted with the
only
, except
, prefix
, and rename
forms as described below.
only
Produces a subset of the bindings from another ?import-set, including only the listed ?identifiers. The included ?identifiers must be in the original ?import-set.
except
Produces a subset of the bindings from another ?import-set, including all but the listed ?identifiers. All of the excluded ?identifiers must be in the original ?import set.
prefix
Adds the ?identifier prefix to each name from another ?import-set.
rename
Used as:
(rename (?identifier1 ?identifier2) …)
removes the bindings for ?identifier1 …
to form an
intermediate ?import-set, then adds the bindings back for the
corresponding ?identifier2 …
to form the final
?import-set. Each ?identifier1 must be in the original
?import-set, each ?identifier2 must not be in the
intermediate ?import-set, and the ?identifier2s must be
distinct.