[racket] extracting "docstrings" from documentation

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Mon Dec 19 16:08:39 EST 2011

On Mon, Dec 19, 2011 at 3:37 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> What is the usecase for this information? Giving people quick access
> to docs in the REPL?

For my particular use case, I need to take slices of the documentation
and re-present them in a Scribble document.

Specifically: WeScheme has a subset of behavior of Racket. To document
WeScheme's API, I want to take the documentation of the forms in
Racket and inline them into my document.

I want to be able to say something like:

    @copy-documentation[first 'racket/list]
    @copy-documentation[second  'racket/list]

where "copy-documentation" is a hypothetical special form that splices
in the documentation associated to the given binding.  That way, if
the original documentation changes, it's an easy matter for me to
replicate it.  I really want to avoid the copy-and-paste issue.

Another case where this might be useful is in tutorial documentation,
where having the documentation of the forms inline with the rest of
the document can be a very important thing in terms of reducing the
number of indirect references.

Posted on the users mailing list.