The bindings documented in this section are exported by the
(nausicaa parser-tools r6rs libraries) library.
Holds a string representing the system environment variable holding the search path for libraries; it is initialised to ‘R6RS_LIBPATH’. The search path is meant to be a colon–separated list of absolute directory pathnames.
Read the value of the
library-search-path-environment-variableparameter and return a list of
<pathname>records representing the directory pathnames in the search path, see pathnames abstract class.
Hold a thunk which, when evaluated, returns a list of strings representing the directories pathnames in the search path; it is initialised to
Given a library reference record and a file extension string (leading dot included): build and return a
<relative-pathname>record representing the file pathname.
This function joins the identifiers in the library names with a slash separator; it ignores the version specification.
Hold a function which, when applied to a
<library-reference>record and a string representing a file extension (leading dot included), returns a
<relative-pathname>record representing the file pathname; it is initialised to
A list of strings representing extensions for library files to be searched for in the given order; its value is:
- ‘.mosh.sls’ ‘.sls’
- For Mosh Scheme.
- ‘.mzscheme.sls’ ‘.sls’
- For Racket with R6RS language.
- ‘.chezscheme.sls’ ‘.sls’
- For Petite Chez Scheme.
- ‘.vicare.sls’ ‘.sls’
- For Vicare Scheme.
- ‘.ypsilon.sls’ ‘.sls’
- For Ypsilon Scheme.
Given the reference record, make use of the thunk in
library-search-path-functionand the extensions in
library-file-extensionsto scan the file systems in search of compliant libraries. Return a, possibly null, list of
<absolute-pathname>records representing the file pathnames.
This function searches for all the files whose pathname is prefixed with a directory in the search path and suffixed with a relative pathname built by joining the identifiers in the library reference with a separator; finally the extensions are tried in turn. This function ignores library version specifications in pathnames.
Holds a function which, when applied to a
<library-reference>record, scans the file systems and returns a list of file pathnames matching the reference. It is initialised to
Make use of the function in
scan-library-search-path-functionto find, on the system, libraries matching the record R and return a list of
<library>records representing them. If loading a library file fails: the error is ignored and that pathname skipped.
Hold a function used to inspect the system in search for libraries whose name match a given library reference. It is initialised with
Given a library reference record R, inspect the system and load all the libraries having name matching the reference; return a possibly null list of
<library>records sorted from higher version to lower version number.
Make use of
load-library-functionto inspect the system.
When S is used, and it is not
#f, this function first searches the store for already loaded libraries: if at least one is found, the system is not inspected; if none are found, the system is inspected and the result saved in the store.