On Fri, 2010-01-15 at 23:57 -0600, Eduardo Cavazos wrote:
> On Fri, 2010-01-15 at 21:36 -0800, Derick Eddington wrote:
>
> > Actually, it's illegal, if there are definitions after it, because
> > expressions cannot precede definitions in a library body.
>
> 8-)
>
> Hmmm... Well maybe something like:
>
> (define library-info '((author . "...")
> (summary . "...")))
I think the "right thing" is:
(library (xyz)
(export xyz)
(import (rnrs))
(author "...")
(summary "...")
(license "...")
...)
Unforunately, that's not an option unless the implementation supports
those extensions to the 'library' form.
Another option:
(library (xyz)
(export xyz)
(import (rnrs) (library-annotation))
(author "...")
(summary "...")
(license "...")
...)
But the drawback is that you'll always need to import that extra library
for the 'author', 'summary', etc.
Finally, there's:
(define library-info
'((author . "...")
(summary . "...")))
Which doesn't require additional imports, but also doesn't look as nice
as the first two options.
Are there implementations that give users control over how the library
form is expanded?
Anywho, other solutions would get into putting the data inside comments
or in external files.
Ed