<div dir="ltr">Hi all,<div><br></div><div>Is it possible to, after requiring a particular module, get a list of all the definitions provided by that module?</div><div><br></div><div>For instance, can I do something like this?</div>
<div><font face="courier new, monospace">> (module m racket</font></div><div><font face="courier new, monospace"> (provide (all-defined-out))</font></div><div><font face="courier new, monospace"> (define CONSTANT 42)</font></div>
<div><font face="courier new, monospace"> (define function (lambda (x) 'foo))</font></div><div><font face="courier new, monospace"> (struct banana (dna)))</font></div><div><font face="courier new, monospace">> (require 'm)</font></div>
<div><font face="courier new, monospace">> (all-defined-from 'm)</font></div><div><font face="courier new, monospace">'(CONSTANT function banana)</font></div><div><font face="courier new, monospace"><br></font></div>
<div><font face="arial, helvetica, sans-serif">I realize I could do this simply by defining all-defined-from-m inside my module such that it returns a hard-coded list of symbols, but that's not a general solution and wouldn't work if wanted the definitions from a module I hadn't defined.</font><br clear="all">
<div><br></div>-- <br><div dir="ltr"><i><font face="garamond, serif">SEE YOU SPACE COWBOY...</font></i></div>
</div></div>