Next: , Previous: , Up: The Library System   [Contents][Index]

1.4 Catalog Creation

At the start of an interactive session no catalog is present, but is created with the first catalog inquiry (such as (require 'random)). Several sources of catalog information are combined to produce the catalog:

SLIB combines the catalog information which doesn’t vary per user into the file slibcat in the implementation-vicinity. Therefore slibcat needs change only when new software is installed or compiled. Because the actual pathnames of files can differ from installation to installation, SLIB builds a separate catalog for each implementation it is used with.

The definition of *slib-version* in SLIB file require.scm is checked against the catalog association of *slib-version* to ascertain when versions have changed. It is a reasonable practice to change the definition of *slib-version* whenever the library is changed. If multiple implementations of Scheme use SLIB, remember that recompiling one slibcat will update only that implementation’s catalog.

The compilation scripts of Scheme implementations which work with SLIB can automatically trigger catalog compilation by deleting slibcat or by invoking require of a special feature:

Procedure: require ’new-catalog

This will load mklibcat, which compiles and writes a new slibcat.

Another special feature of require erases SLIB’s catalog, forcing it to be reloaded the next time the catalog is queried.

Procedure: require #f

Removes SLIB’s catalog information. This should be done before saving an executable image so that, when restored, its catalog will be loaded afresh.

Next: , Previous: , Up: The Library System   [Contents][Index]