denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] Documenting the procedures and variables defined in schem


From: Richard Shann
Subject: [Denemo-devel] Documenting the procedures and variables defined in scheme
Date: Fri, 20 Nov 2009 10:53:51 +0000

Neil Jerram has come up with the following runes for documenting the
interface to denemo from scheme: 

(module-for-each (lambda (name var)
                      (format #t "variable `~A', value `~s'~%" name
                              (variable-ref var)))
                    (current-module))

This splurges out the name and value of all the things we define in
scheme from C, and I am not sure what else. I have written a little
variant

 (module-for-each (lambda (name var)
                    (let ((mystring ""))
                      (set! mystring (format #f "`~a'" (variable-ref var)))
                      (display (string-append mystring "\n"))))

(current-module))

this one just putting out the (variable-ref var) thing - what I referred
to as the value above - after getting it into a string (called mystring
in the code).

With a better understanding of things like variable-ref we could write
something elegant, but in any case we could simple hack at the mystring
to create a list of variables and a list of procedures, potentially
other information.
Anybody any thoughts on getting the tooltip/associating documentation
string with variables?

Richard






reply via email to

[Prev in Thread] Current Thread [Next in Thread]