Next: libutils expanding, Previous: libutils libraries, Up: libutils [Index]
When a library is loaded in source or binary form, it is “interned”; to intern a library means to add it to an internal collection along with all its dependency libraries. Interned libraries are neither invoked nor visited; the invoke–time and visit–time depend upon the usage we make of them.
In a Vicare process, there can be only one library with a given
sequence of symbols in its name; if we have already loaded the library
(a b (1))
, it is not possible to load a library (a b
(2))
, because they have the sequence (a b)
in common.
The following bindings are exported by the library (vicare
libraries)
.
Return a list of <library>
objects representing interned
libraries. If all? is non–false: return all the interned
libraries, else return only the visible ones.
Given a R6RS library name: try to search and intern the
corresponding library, if it is not already interned; when successful
return the corresponding <library>
object, otherwise raise an
exception.
First search for the library among the interned ones then, if not found,
in an external libraries repository using the procedure referenced by
the parameter current-library-loader
.
Given a R6RS library reference: try to search and intern the
corresponding library, if it is not already interned; when successful
return the corresponding <library>
object, otherwise raise an
exception.
First search for the library among the interned ones then, if not found,
in an external libraries repository using the procedure referenced by
the parameter current-library-loader
.
Given a library descriptor, as generated by the function
library-descriptor
(see library-descriptor): try to search and intern the corresponding
library, if it is not already interned; when successful return the
corresponding <library>
object, otherwise raise an exception.
First search for the library among the interned ones then, if not found,
in an external libraries repository using the procedure referenced by
the parameter current-library-loader
.
Visit the collection of interned libraries and return the first for
which pred returns non–false. If pred returns #f
for
all the interned libraries: return #f
.
pred must be a function accepting as single argument a
<library>
object.
Given a symbolic expression representing a R6RS library name: visit
the collection of interned libraries and return the first
<library>
object having conforming library name identifiers. If
no matching library is found: return #f
.
Given a symbolic expression representing a R6RS library reference:
visit the collection of interned libraries and return the first
<library>
object having conforming library name identifiers. If
no matching library is found: return #f
.
Given a library descriptor, as generated by the function
library-descriptor
: visit the collection of interned libraries
and return the first <library>
object having the same library
UID. If no matching library is found: raise an exception.
Interned libraries can be uninterned, either to free system resources or to allow reinterning from new files.
This function uninterns a library given its R6RS library name. If err? is non–false: if the library is not currently interned an exception is raised; otherwise nothing happens. Return unspecified values.
NOTE The implementation of this function is incomplete. It is to be used at the REPL when experimenting does not hurt.
Next: libutils expanding, Previous: libutils libraries, Up: libutils [Index]