chickadee » chicken » modules » import

(import IMPORT ...)syntax

Imports module bindings into the current syntactical environment. The visibility of any imported bindings is limited to the current module, if used inside a module-definition, or to the current compilation unit, if compiled and used outside of a module.

Importing a module does not load or link it - this is a separate operation from importing its bindings.

IMPORT may be a module name or an import specifier, where a module name is either a symbol or a list of the form (srfi N). An IMPORT defines a set of bindings that are to be made visible in the current scope.

Note that the imported bindings are only visible in the next toplevel expression (regardless of whether the import appears inside or outside a module):

 (begin
   (import m1)
   ...)              ; imports not visible here
 
 ...                ; imports visible here