[racket-dev] Module metadata

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Tue Apr 19 17:29:10 EDT 2011

On Tue, Apr 19, 2011 at 5:22 PM, Robby Findler
<robby at eecs.northwestern.edu> wrote:
> How about just putting an export into the module that you build at compile time?

Unfortunately, then I can't require two of these modules at once, or
else every time I do I have to use (except-out <module>
metadata-name).  Exports are not a very good side channel of
information because they eat up important namespace.

> (Also you might want to go check and see how scribble does proc-doc
> and possibly scribble/lp. I forget the details now, but they are doing
> similar things.)

Okay, I'll see what I can find.  Are these mechanisms documented, or
do you mean I should look at the code?


> On Tue, Apr 19, 2011 at 4:02 PM, Carl Eastlund <cce at ccs.neu.edu> wrote:
>> I would like to associate metadata with a module based on its
>> expansion.  In my case, I want the Dracula language to be able to
>> construct an s-expression representing an ACL2 proof obligation at
>> phase 1, associate it with the module, and have the Dracula tool in
>> DrRacket extract the proof obligation at phase 0 so it can send it to
>> ACL2.  In another case, someone on the IRC channel wants to associate
>> documentation with the exports of a module.  Again, this information
>> is constructed at phase 1, but might be read at some arbitrary other
>> phase by another tool.
>> Is there a way to do this?  I have not been able to find one.  We
>> currently have various metadata associated with modules, such as the
>> #:info and #:language-info options in syntax/module-reader, but those
>> come from the reader.  The metadata is constructed prior to expansion.
>>  Is it possible to add a similar channel for post-expansion metadata
>> associated with modules?
>> Carl Eastlund

Posted on the dev mailing list.