Next: , Previous: , Up: Compiling Scheme   [Contents][Index]


1.6.2 Module Manifests

(require 'manifest)

In some of these examples, slib:catalog is the SLIB part of the catalog; it is free of compiled and implementation-specific entries. It would be defined by:

(define slib:catalog (cdr (member (assq 'null *catalog*) *catalog*)))
Function: file->requires file provided? catalog

Returns a list of the features required by file assuming the predicate provided? and association-list catalog.

(define (provided+? . features)
  (lambda (feature)
    (or (memq feature features) (provided? feature))))

(file->requires "obj2str.scm" (provided+? 'compiling) '())
        ⇒ (string-port generic-write)

(file->requires "obj2str.scm" provided? '())
        ⇒ (string-port)
Function: feature->requires feature provided? catalog

Returns a list of the features required by feature assuming the predicate provided? and association-list catalog.

(feature->requires 'batch (provided+? 'compiling) *catalog*)
        ⇒ (tree line-i/o databases parameters string-port
                   pretty-print common-list-functions posix-time)

(feature->requires 'batch provided? *catalog*)
        ⇒ (tree line-i/o databases parameters string-port
                   pretty-print common-list-functions)

(feature->requires 'batch provided? '((batch . "batch")))
        ⇒ (tree line-i/o databases parameters string-port
                   pretty-print common-list-functions)
Function: feature->requires* feature provided? catalog

Returns a list of the features transitively required by feature assuming the predicate provided? and association-list catalog.

Function: file->requires* file provided? catalog

Returns a list of the features transitively required by file assuming the predicate provided? and association-list catalog.

Function: file->loads file

Returns a list of strings naming existing files loaded (load slib:load slib:load-source macro:load defmacro:load syncase:load synclo:load macwork:load) by file or any of the files it loads.

(file->loads (in-vicinity (library-vicinity) "scainit.scm"))
        ⇒ ("/usr/local/lib/slib/scaexpp.scm"
            "/usr/local/lib/slib/scaglob.scm"
            "/usr/local/lib/slib/scaoutp.scm")
Function: load->path exp

Given a (load '<expr>), where <expr> is a string or vicinity stuff), (load->path <expr>) figures a path to the file. load->path returns that path if it names an existing file; otherwise #f.

(load->path '(in-vicinity (library-vicinity) "mklibcat"))
        ⇒ "/usr/local/lib/slib/mklibcat.scm"
Function: file->definitions file definer …

Returns a list of the identifier symbols defined by SLIB (or SLIB-style) file file. The optional arguments definers should be symbols signifying a defining form. If none are supplied, then the symbols define-operation, define, define-syntax, and defmacro are captured.

(file->definitions "random.scm")
        ⇒ (*random-state* make-random-state
           seed->random-state copy-random-state random
           random:chunk)
Function: file->exports file definer …

Returns a list of the identifier symbols exported (advertised) by SLIB (or SLIB-style) file file. The optional arguments definers should be symbols signifying a defining form. If none are supplied, then the symbols define-operation, define, define-syntax, and defmacro are captured.

(file->exports "random.scm")
        ⇒ (make-random-state seed->random-state
            copy-random-state random)

(file->exports "randinex.scm")
        ⇒ (random:solid-sphere! random:hollow-sphere!
            random:normal-vector! random:normal
            random:exp random:uniform)
Function: feature->export-alist feature catalog

Returns a list of lists; each sublist holding the name of the file implementing feature, and the identifier symbols exported (advertised) by SLIB (or SLIB-style) feature feature, in catalog.

Function: feature->exports feature catalog

Returns a list of all exports of feature.

In the case of aggregate features, more than one file may have export lists to report:

(feature->export-alist 'r5rs slib:catalog))
        ⇒ (("/usr/local/lib/slib/values.scm"
             call-with-values values)
            ("/usr/local/lib/slib/mbe.scm"
             define-syntax macro:expand
             macro:load macro:eval)
            ("/usr/local/lib/slib/eval.scm"
             eval scheme-report-environment
             null-environment interaction-environment))

(feature->export-alist 'stdio *catalog*)
        ⇒ (("/usr/local/lib/slib/scanf.scm"
             fscanf sscanf scanf scanf-read-list)
            ("/usr/local/lib/slib/printf.scm"
             sprintf printf fprintf)
            ("/usr/local/lib/slib/stdio.scm"
             stderr stdout stdin))

(feature->exports 'stdio slib:catalog)
        ⇒ (fscanf sscanf scanf scanf-read-list
             sprintf printf fprintf stderr stdout stdin)

Next: , Previous: , Up: Compiling Scheme   [Contents][Index]