the sph-script repository contains guile-module-dependencies, which you can save and use with guile. sph-lib must also be installed for it to work. add the executable bit with "chmod +x filename" and move the file into a path listed in the environment variable $PATH to have it as a global command line command.
guile-module-dependencies can output the list of modules a module depends on. either as a list with indentation or in the graphviz dot language format to view it as a graph drawing.
parameters options ... name description displays a dependency tree for a module. module name is given with brackets, for example "(srfi srfi-1)" options --exclude=value prefixes to exclude --format=value indent or graphviz (dot language) --help | -h --include=value prefixes to include, "(a b),(c)" --interface --max-depth=value --no-brackets --strip-prefix=value
if the script file is not in a $PATH directory, it can be called as "guile guile-module-dependencies".
guile-module-dependencies "(sph)" --max-depth=1
output:
(guile) (ice-9 ports) (ice-9 pretty-print) (guile) (ice-9 match) (srfi srfi-1) (rnrs bytevectors)
guile-module-dependencies "(sph)" --max-depth=1 --format=graphviz > t.dot
the xdot tool can render and display .dot files directly:
xdot t.dot