On Sat, 2010-01-16 at 05:16 -0600, Eduardo Cavazos wrote:

> > Certainly items like 'author', 'summary', etc should be optional, not
> > rigid parts of the library form. In fact, 'export' and 'import' should
> > be the only mandatory items. So, then this could work:
> > 
> >     (library (xyz)
> > 
> >         (author "...")
> > 
> >         (summary "...")
> > 
> >         (license "...")
> > 
> >         (export "...")
> > 
> >         (import "...")
> > 
> >         ...)
> > 
> > I.e. optional items come before 'export' and 'import'.

On Sat, 2010-01-16 at 05:30 -0800, Derick Eddington wrote:

> I think that would work.  You could explore it by hacking Ikarus to do
> it, and then propose an SRFI.  The purpose of making it part of the
> library form is so it's machine processable (right?), so I suppose the
> forms should be specified enough to be useful in that way.

A very conservative design would say that optional expressions are
allowed before the 'export' spec and that it is unspecified what they
do. :-) Other utilities can then read/extract this information.

A whole other can of worms is having a way to query the Scheme system
for information about the available libraries. For example,

    * Get a list of available libraries (not just those loaded)
    * For a given library, ask what file it came from
    * For a given library, get the symbols it exports
    * For a given library, get the import spec

These are pretty easy to cook up as shell scripts (some written in
Scheme). The scripts would be trivial wrappers if this information were
available via the Scheme implementation.

Extracting the optional library information would then fit into such a
framework.

Ed

Reply via email to