[Top][All Lists]

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

Re: r6rs libraries

From: Julian Graham
Subject: Re: r6rs libraries
Date: Mon, 16 Feb 2009 13:35:40 -0500

Hi Guilers,

Just wanted to give an update on the status of the library system I've
been working on:

* As per the discussion above, my implementation uses an implicit
phasing approach (i.e., it doesn't do multiple instantiation) along
with `(ice-9 syncase)' to handle expand-time evaluation --
specifically, by way of evaluation environments based on on-the-fly
creation of custom module interfaces.  I wasn't able to find
Abdulaziz's ACM paper, but his "formal comment" on the subject of R6RS
phasing [1] was informative.  (In fact, a lot of the formal comments
were handy: [2].)  I haven't yet delved into how severe the breakage
is where there are differences between Guile's `syntax-case' and
R6RS's, but I'm hoping it's, you know, mild.

* Given the above, my current implementation is hovering at about 200
lines, whereas the current reference implementations, because they
don't presume an existing macro or module system, are several orders
of magnitude larger.  Thanks are due to Tom Lord (and everyone else
who designed Guile's module / interface system) for making this
possible, if not downright easy.

* At the moment, R6RS libraries can "import" Guile modules directly,
but the reverse is not true, partly because I can't figure out a good
way to map version information onto the filesystem in a way that
Guile's module system can understand.  My initial thought was to do it
such that a library's version would map to its module name, a la:

(library (foo bar baz (6))

would live in


...but Guile doesn't like numbers in the module name.  Right now I'm
trying to think of way to do a transformation on a library expression
such that multiple versions of the same library could live in the same
Guile module and be accessed individually by some kind of manifest at
"use" time, but I can't figure out what that module name and the
extra, associated API should look like.

* It would be cool if the module system had hooks of some sort to
allow it to receive hints about locating modules.

* The "party balloons" example from the R6Rs is working, at least
intermittently.  The "quotient-and-remainder" example is almost there.


[1] -
[2] -

reply via email to

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