Next: Module Semantics, Previous: Module Conventions, Up: Compiling Scheme [Contents][Index]
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*)))
Returns a list of the features require
d 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)
Returns a list of the features require
d 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)
Returns a list of the features transitively require
d by feature
assuming the predicate provided? and association-list catalog.
Returns a list of the features transitively require
d by file
assuming the predicate provided? and association-list catalog.
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")
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"
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)
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)
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.
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: Module Semantics, Previous: Module Conventions, Up: Compiling Scheme [Contents][Index]