guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: r6rs libraries


From: Andy Wingo
Subject: Re: r6rs libraries
Date: Sun, 28 Dec 2008 12:09:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Hi Julian,

On Sun 28 Dec 2008 02:05, "Julian Graham" <address@hidden> writes:

> My inclination is that because Guile's module system already has
> almost all of the functionality of R6RS libraries, it might make sense
> to support libraries by transforming them into module definitions.
> Unfortunately, there's that nasty import levels thing to deal with.
> It seems like that aspect of the library spec is attempting to resolve
> some issues that (I think) Guile struggled with a while ago, re: the
> handling of symbols in macros across module boundaries.  What's the
> status of that?

Yes, some thought is required here.

 1) psyntax.ss should probably be replaced (in part?) with an
    implementation of R6RS macros, which have some extensions relative
    to R5RS, but otherwise are compatible afaik

 2) that replacement should Do The Right Thing regarding expansion of
    the r6rs `library' form: i.e. expand `library' into something based
    on Guile's modules if run in r6rs mode, and leave it alone otherwise

 3) that replacement should be module-aware, expanding unbound symbols
    to (@@ MOD SYM) forms as appropriate

There are two implementations of r6's macros afaik; we should probably
use the one that Ikarus and Chez use, because it doesn't require
multiple instantiation for modules. (The PLT one is problematic in this
regard; see
http://groups.google.com/group/comp.lang.scheme/browse_thread/thread/8927053ede92fd27
for a long ramble on this).

Here's a reasonably straigtforward explanation of the syncase algorithm:

    http://www.cs.indiana.edu/~dyb/pubs/bc-syntax-case.pdf

Here's a link to Aziz' implementation:

    http://www.cs.indiana.edu/~aghuloum/r6rs-libraries/

I'd like to get around to this at some point, if you decide to punt. But
that's probably not directly relevant to your question on guile-lib ;-)

Andy
-- 
http://wingolog.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]