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

From: Trent Buck <trentbuck>
Date: Mon Nov 13 12:17:40 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)
            ...)

That is, a superlibrary should import sublibraries of EXACTLY the same
version.

This would prevent confusion when, say SSAX v4.1 and SSAX v5.0 were
installed, and the user asked for (ssax 4 1). You don't want (ssax 4
1) to try to import read-xml v5.0 because it asked for read-xml
instead of (read-xml 4 1).

Hopefully I've both explained this right and understood the 5.91
library specification correctly.
-- 
Trent Buck, Student Errant
Received on Mon Nov 13 2006 - 12:17:01 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC