aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-30 14:45:22 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-11-06 00:46:26 +0100
commitd988ba634a585a966926d68918598e54bc77b447 (patch)
tree6f3dab24ead51b1c8d456aef8b3cc6367c6d9236
parentAdd README for HTML components. (diff)
downloadcalp-d988ba634a585a966926d68918598e54bc77b447.tar.gz
calp-d988ba634a585a966926d68918598e54bc77b447.tar.xz
HAdd sections to introspection documentation.
-rw-r--r--doc/ref/introspection.texi48
1 files changed, 31 insertions, 17 deletions
diff --git a/doc/ref/introspection.texi b/doc/ref/introspection.texi
index 6e333eb9..e1abcc84 100644
--- a/doc/ref/introspection.texi
+++ b/doc/ref/introspection.texi
@@ -4,12 +4,31 @@
These are various procedures for getting information about modules,
usually in a static (only looking at ``dead'' source code) way. They
are currently strewn about a couple files, all under
-@file{hnh/module-introspection}.
+@code{(hnh module-introspection)}.
-TODO rework the file structure.
+@node General Module Introspection Utilities
+@section General utilities
+
+The module @code{(hnh module-introspection)} contains general helper
+funcions for inspecting source code.
+
+@defun unique-symbols tree
+Return a list of all symbols occuring in @var{tree}. Each symbol is
+noted exactly once, anything which isn't a symbol is discarded.
+@end defun
+
+@defun module-declaration? form
+Checks if @var{form} starts with @code{'define-module}.
+@end defun
+
+@defun find-module-declaration forms
+@anchor{find-module-declaration}
+In a list of forms, find the first one which satisfies @code{module-declarations?}.
+@end defun
+
+@node Module Uses
+@section Module Uses
-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 its source code.
@@ -49,25 +68,20 @@ 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
-Return a list of all symbols occuring in @var{tree}. Each symbol is
-noted exactly once, anything which isn't a symbol is discarded.
-@end defun
-
-@defun module-declaration? form
-Checks if @var{form} starts with @code{'define-module}.
-@end defun
-
-@defun find-module-declaration forms
-@anchor{find-module-declaration}
-In a list of forms, find the first one which satisfies @code{module-declarations?}.
-@end defun
+@node Static Module Introspection Utilities
+@section Static Utilities
@defun get-forms port
Repeatadly call @code{read} on @var{port}, and return a list of the
read forms in order of occurence in the file.
@end defun
+@node Finding all Modules in Directory
+@section Finding all Modules in Directory
+
+TODO the all-*-under-directory procedures really need to be
+straightened out.
+
@defun all-files-and-modules-under-directory dir
Like @code{all-modules-under-directory}, but returns 2-lists of
filename + module name.