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

Ideas for documentation system



Hi all,

Is there anything like the Emacs help system and/or JavaDoc for
Dr/MzScheme? If not, is there interest in such a system? I'm thinking
of a system whereby one could say:

(documentation the-symbol "the-symbol is blah blah blah"
	(param x "The parameter x is *mumble*"
		(pre "This is the precondition of x"
		     (<code fragment to test precondition>))
		(post "This is the postcondition of x"
		     (<code fragment>))
		(example "This is an example of usage of x"))
	(param y ...)
	(pre "Preconditions for using the-symbol" ...)
	(post ...)
	(example "Example of using the-symbol"))

>From such a definition, a suitable processor could
- generate an interactive help system like Emacs/Common Lisp
- generate XML documentation that could be shared amongst different
Scheme implementations or converted to HTML
- insert and remove assertions to test for pre and postconditions

I feel this has an advantage over doc-strings by being a bit more
structured, so allowing better presentation and conveying more
information. If one wants to, one could only define a docstring in the
above system, but one also the ability to define additional useful
information.

Any thoughts from others?

cya,
Noel