From b0528e65b417840763b90e8f2d6d2503621f7596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 30 Oct 2023 14:20:40 +0100 Subject: Update module-uses* documentation. --- doc/ref/introspection.texi | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'doc/ref') diff --git a/doc/ref/introspection.texi b/doc/ref/introspection.texi index 3ac31d11..6e333eb9 100644 --- a/doc/ref/introspection.texi +++ b/doc/ref/introspection.texi @@ -12,13 +12,41 @@ TODO the all-*-under-directory procedures really need to be straightened out. @defun module-uses* forms -Find all dependencies of a module by statically analyzing it's source code. +Find all dependencies of a module by statically analyzing its source code. It gives worse resluts than Guile's built in @code{module-uses}, but has the benefit that a module which doesn't compile can still be checked. @var{froms} should be a list gotten by repeateadly calling @code{read} on a Scheme source file. + +The return value is a list of sublists, where the car of each list is +the module's name (for example @code{(ice-9 format)}), and the cdr +being a keyword tagged list with the following tags and types, +corresponding to @code{use-modules} parameters. + +@table @samp +@item #:select +List of imported symbols, present if only a subset of the exported +symbols are imported. + +@item #:hide +List of symbols removed from the import. Always present, but may be an +empty list if nothing was hidden. + +@item #:prefix +A symbol which prefixes all imported symbols. + +@item #:renamer +literally what is written. + +@item #:version +A list of exact integers. + +@end table + +Note that if the module was imported multiple times then it will be +present multiple times in the list, possibly with different options. @end defun @defun unique-symbols tree -- cgit v1.2.3