[Top][All Lists]

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

Re: r6rs libraries

From: Ludovic Courtès
Subject: Re: r6rs libraries
Date: Tue, 17 Feb 2009 22:43:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux)

Hi Julian,

Thanks for the nice report!

Julian Graham <address@hidden> writes:

> * 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
> /foo/bar/6/baz.scm
> ...but Guile doesn't like numbers in the module name.

There are many other things that it doesn't like in module names,
typically any standard top-level binding (`eval', `+', etc.) can't be
used as a module name component.  That plus "special" chars means you
really need some name mangling, as Andreas suggested.

As for version numbers, you could have a mapping like the following:

  R6RS Name             Guile Name

  (foo bar)      -->    (foo bar)
  (foo bar (6))  -->    (foo bar version-6)

(Given the recursive name space, this would allow the implementation of
several versions in a single file.  In this example, `version-6' in
`(foo bar)' just has to be bound to a module.)


reply via email to

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