[r6rs-discuss] [Formal] Add a multi-file library example

MichaelL at frogware.com MichaelL at frogware.com
Mon Nov 13 12:32:39 EST 2006


> On Sun, Nov 12, 2006 at 11:09:55PM -0500, MichaelL at frogware.com wrote:
> > Imagine wrapping a large package like SSAX in a library. The library
> > form might look something like this:
> > 
> >     (library (ssax (5 0))
> >             (export read-xml write-xml ...)
> >             (import r6rs)
> >             ...)
> 
> Assuming read-xml and write-xml are libraries in the SSAX
> superpackage, I would prefer
> 
>     (library (ssax (5 0))
>             (export (read-xml 5 0) (write-xml 5 0) ...)
>             (import r6rs)
>             ...)

read-xml and write-xml were supposed to be examples of procedures exported 
by the ssax library. In 5.91 libraries can't export libraries. Indeed, 
library names aren't even identifiers so it would be a little tricky to 
add that ability down the road. For example, how would "prefix" or 
"rename" work when importing a compound name? (I submitted a separate 
comment on that.)

Btw, some Schemes (like Chez) do support libraries-exporting-libraries (in 
Chez they're called modules), so it's both a reasonable and useful 
feature.

> Hopefully I've both explained this right and understood the 5.91
> library specification correctly.

I have the same hope. :-)



More information about the r6rs-discuss mailing list