[plt-scheme] Some sort of documentation tool from the toplevel?
Hi everyone,
I'd like to write a tool that'll help me get quick documentation strings
for an arbitrary mzscheme primitive function. For the life of me, I can't
remember all of the mzscheme primitives, nor what order the arguments have
to be in, nor what optional arguments they accept.
I took a brief glance at what Help Desk provides, and it looks neat, but
unless I'm mistaken, several of its components require MrEd to be up and
running; I'd like to have something that can be run off the toplevel, so
that I can get documentation if I'm running through Emacs. I'm also only
interested in the mzscheme primitives at the moment.
In my "wishing makes it so" hat, I'd love to see something like this:
;;;;;;;;;
> (helpme make-hash-table)
(make-hash-table [flag-symbol flag-symbol])
(make-hash-table [flag-symbol flag-symbol]) creates and returns a new hash
table. If provided, each flag-symbol must one of the following:
'weak -- creates a hash table with weakly-held keys (see section 13.1).
'equal -- creates a hash table that compares keys using equal? instead of
eq? (needed, for example, when using strings as keys).
By default, key comparisons use eq?. If the second flag-symbol is
redundant, the exn:fail:contract exception is raised.
Two hash tables are equal? if they are created with the same flags, and if
they map the same keys to equal? values (where ``same key'' means either
eq? or equal?, depending on the way the hash table compares keys).
> (helpme hash-table)
I don't know about procedure 'hash-table'. Do you mean one of the
following?
make-hash-table
make-immutable-hash-table
hash-table?
...
;;;;;;;;;
This doesn't seem like a hard project, and I'm sure I'd learn a lot from
it. I can crib most of the content of this tool off of the existing
documentation --- I see that there's a file called 'keywords' in:
http://pre.plt-scheme.org/docs/plt-docs.tgz
which is almost perfect for what I need. The only problem I see is that
I'll probably be doing some HTML scraping if I go this route. I'd rather
try to avoid that unless I really need to. I've been looking for the
original TeX documents that generate the HTML docs as well as the keywords
file, but haven't been able to find it yet from Subversion or from that
plt-docs.tgz file. Are these accessible?
Thanks in advance!