unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: "Julian Graham" <joolean@gmail.com>
Cc: Guile User <guile-user@gnu.org>, Neil Jerram <neiljerram@googlemail.com>
Subject: Re: r6rs libraries
Date: Sun, 28 Dec 2008 12:09:43 +0100	[thread overview]
Message-ID: <m3k59ktv2g.fsf@pobox.com> (raw)
In-Reply-To: <2bc5f8210812271705h3f57cb29w5bb83cb02abe971@mail.gmail.com> (Julian Graham's message of "Sat, 27 Dec 2008 20:05:38 -0500")

Hi Julian,

On Sun 28 Dec 2008 02:05, "Julian Graham" <joolean@gmail.com> 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	other threads:[~2008-12-28 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-28  1:05 r6rs libraries (was Re: role of guile-lib) Julian Graham
2008-12-28 11:09 ` Andy Wingo [this message]
2008-12-29  6:38   ` r6rs libraries Julian Graham
2009-01-02  4:10     ` Julian Graham
2009-01-05 23:40       ` Ludovic Courtès
2009-01-06  9:45         ` Andy Wingo
2009-01-11 23:21           ` Julian Graham
2009-01-13 16:17             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3k59ktv2g.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=guile-user@gnu.org \
    --cc=joolean@gmail.com \
    --cc=neiljerram@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).