import[syntax] import name
ChezScheme, STk, STklos, Gauche:
Imports bindings exported from module name.
Chez's import affects local bindings, while STklos and Guile's affect
only the global bindings.
Chez:
(module m (y) (define y 'm-y))
(let ((x 'local-x) (y 'local-y))
(import m)
(list x y)) ==> (local-x m-y)
Gauche:
(define-module m (export y) (define y 'm-y))
(let ((x 'local-x) (y 'local-y))
(import m)
(list x y)) ==> (local-x local-y)
In other words, Chez's import works as if the bindings that are
exported from the module are inserted where the import form
appears.
See also module, define-module, import-only, Gauche:ModuleSystem,
STklos:ModuleSystem?.
[module clause] import (module import ...) ...
[module clause] import module
Chicken: Can only appear in the module clause of define-module.
Imports symbol from module. import can be a symbol
or (symbol rename). You can selectively import symbols, optionally
renaming, or give no imports to import all exported symbols. The second
form is the same as (import (module)). See also import-excluding,
Chicken:ModuleSystem?.
|