From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: r6rs libraries Date: Tue, 17 Feb 2009 22:43:24 +0100 Message-ID: <878wo4kadf.fsf@gnu.org> References: <2bc5f8210812271705h3f57cb29w5bb83cb02abe971@mail.gmail.com> <2bc5f8210812282238p1f91f352id7eca5280dc9ff6a@mail.gmail.com> <2bc5f8210901012010g2ebb6effx5c966d0e26fe382b@mail.gmail.com> <8763kt48zi.fsf@gnu.org> <2bc5f8210901111521i1a5ec85em65ee20135cc55ebb@mail.gmail.com> <877i4z89jy.fsf@gnu.org> <2bc5f8210901251627t5d59f9fg5bc5dcceaf2a0b9f@mail.gmail.com> <2bc5f8210901280926o399f4505nc1d30c6017886a81@mail.gmail.com> <2bc5f8210902161035p1f2e9125p58c2ad6c4def28fb@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234907048 30670 80.91.229.12 (17 Feb 2009 21:44:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 21:44:08 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Feb 17 22:45:24 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZXkm-0000Hb-7F for guile-devel@m.gmane.org; Tue, 17 Feb 2009 22:45:20 +0100 Original-Received: from localhost ([127.0.0.1]:55249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZXjS-0006Re-5w for guile-devel@m.gmane.org; Tue, 17 Feb 2009 16:43:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZXjD-0006Jq-Ob for guile-devel@gnu.org; Tue, 17 Feb 2009 16:43:43 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZXj9-0006HC-Vh for guile-devel@gnu.org; Tue, 17 Feb 2009 16:43:41 -0500 Original-Received: from [199.232.76.173] (port=50294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZXj9-0006Gu-JS for guile-devel@gnu.org; Tue, 17 Feb 2009 16:43:39 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:52683 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZXj9-0000jo-6m for guile-devel@gnu.org; Tue, 17 Feb 2009 16:43:39 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LZXj4-00081j-7K for guile-devel@gnu.org; Tue, 17 Feb 2009 21:43:34 +0000 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2009 21:43:34 +0000 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Feb 2009 21:43:34 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 38 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 =?iso-8859-1?Q?Pluvi=F4se?= an 217 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i686-pc-linux-gnu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) Cancel-Lock: sha1:f2cuGJZ5eTlGsIhSOEP+JQRZvRE= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8172 Archived-At: Hi Julian, Thanks for the nice report! Julian Graham 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.) Thanks, Ludo'.