draft
some available options and examples
(define (test a b) "this is a docstring" code ...)
modules have no automatically associated docstrings but it is possible to define a variable with a string.
(define-module (a b)) (export a-b-description "this is a description of the module")
the name can be constructed from the module name and used to lookup module documentation.
a generic way to document syntax is to do so in the module description:
(define-module (a b)) (export a-b-description "this is a description of the module # syntax quote-odd :: a ... quotes every second element")
guiles (or guile-libs) define-syntax-rules supports a docstring as a middle argument:
(define-syntax-rule pattern "docstring" expansion)
the sph-script repository contains guile-display-documentation, 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-display-documentation "(sph string)"
parameters options ... module-name description display documentation (bindings, arguments and docstrings) extracted from guile modules. module name is with brackets, for example "(rnrs hashtables)". format is either indent, markdown, signature or list. the default is indent options --about | -a --format=value | -f value --help | -h --interface