murarth / ketos

Lisp dialect scripting and extension language for Rust programs
Apache License 2.0
751 stars 45 forks source link

Functions for getting/setting docs #52

Closed ysimonson closed 5 years ago

ysimonson commented 5 years ago

There's set-module-doc, but no equivalent for getting module docs, or for getting/setting docs of anything else. Is this by design? Or have they just not been implemented yet?

murarth commented 5 years ago

The functions in question do exist, in the code module (which can be found at src/ketos/mod_code.rs).

I generally try to keep non-essential functions out of the global namespace. set-module-doc is an exception because module doc-comment syntax (;;; foo) is translated during parsing to the expression (set-module-doc "foo") and, therefore, must be globally available.

ysimonson commented 5 years ago

Ah cool, thanks. I wasn't seeing it in tab-completion, but that makes sense since it's in a module.