From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Transform R6RS SRFI module name on definition. Date: Thu, 03 Dec 2015 10:05:09 +0100 Message-ID: <877fkvaomy.fsf@T420.taylan> References: <87vbapueqe.fsf@T420.taylan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1449133450 11874 80.91.229.3 (3 Dec 2015 09:04:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Dec 2015 09:04:10 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Dec 03 10:04:10 2015 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a4Po9-0006hb-Hx for guile-devel@m.gmane.org; Thu, 03 Dec 2015 10:04:09 +0100 Original-Received: from localhost ([::1]:34114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Po8-000752-Td for guile-devel@m.gmane.org; Thu, 03 Dec 2015 04:04:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Pnx-00073S-L1 for guile-devel@gnu.org; Thu, 03 Dec 2015 04:04:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4Pnt-0004gn-Nm for guile-devel@gnu.org; Thu, 03 Dec 2015 04:03:57 -0500 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:37943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4Pnt-0004gc-H0 for guile-devel@gnu.org; Thu, 03 Dec 2015 04:03:53 -0500 Original-Received: by wmec201 with SMTP id c201so12758653wme.1 for ; Thu, 03 Dec 2015 01:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=IXMTxrOp4KcjLQjFzCRQmETcAxU9GjGXF/w/i0+iPfA=; b=iu4H3PC8vOUk5IDrUEfARAXYapevVDUcK1nf/CB8YLpjrznxNyuSjck57O7Sv5VRH/ xp6pqO15K5zjONX5k99YJpv6fk6zuDreKYgpiitsYQKLP17ZHGYm4+diAYEW4Vvtgs8Q enbs0pHDfj7NThCcJsl31P9tvZV5JzsYdXGxkl/aYo3Ye6Ye37NFeq23bMFrs5xqe0MG 8LZw5YAsr3jTo95jTvAVJ77ZMiNoz8UQysB18TDpdu2twqO6qduAQlU6hhj1+UdahRGM YvdI/wk9hNkGEy1X90z4bCw/GxgHK9ny4sT5BIxSUJeozOxjy+pNbPYAPg6F9PTZMxgT eDOA== X-Received: by 10.28.182.134 with SMTP id g128mr51163719wmf.95.1449133432909; Thu, 03 Dec 2015 01:03:52 -0800 (PST) Original-Received: from T420.taylan ([2a02:908:c32:4740:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id t5sm6949760wmt.1.2015.12.03.01.03.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 01:03:51 -0800 (PST) In-Reply-To: <87vbapueqe.fsf@T420.taylan> ("Taylan Ulrich \=\?utf-8\?Q\?\=5C\=22Bay\=C4\=B1rl\=C4\=B1\=2FKammer\=5C\=22\=22's\?\= message of "Fri, 02 Oct 2015 23:45:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:18081 Archived-At: taylanbayirli@gmail.com (Taylan Ulrich "Bay=C4=B1rl=C4=B1/Kammer") writes: > Currently our R6RS 'import' form automatically transforms an import like > (srfi :n ...) to (srfi srfi-n ...). > > This works fine with the SRFIs that ship with Guile and any extra SRFI > modules defined with the verbose name format (srfi srfi-n ...). > > However, when one really defines a library named (srfi :n ...), then > 'import' fails to find this because it only looks for the verbose name. > > Here a transcript showcasing the issue: > > --- snip --- > scheme@(guile-user)> (library (srfi :200) (export test) (import (rnrs bas= e)) (define test 'test)) > scheme@(srfi :200)> ,m guile-user > scheme@(guile-user)> (import (srfi :200)) > While compiling expression: > ERROR: no code for module (srfi srfi-200) > scheme@(guile-user)> ,use (srfi :200) > scheme@(guile-user)> test > $2 =3D test > scheme@(guile-user)> > --- snip --- > > (Use-modules actually finds it, as you see.) > > The attached patch makes our R6RS 'library' form automatically transform > a library name like (srfi :n ...) to (srfi srfi-n ...). > > Will this leak out to the user in such a way that it breaks conformance > or creates problems? Is it bad that this time 'use-modules' won't be > able to find (srfi :n ...)? I don't think it is; users should just use > (srfi :n ...) with 'import' and (srfi srfi-n ...) with 'use-modules'. > > Note that it's actually not 'import' itself that does the reverse > transform but a deeper part of the system, and thus for instance the > 'environment' form from (rnrs eval) also correctly resolves the module > name (srfi :n ...) to (srfi srfi-n ...). If there are any "holes" left > where the transform doesn't happen, we should be able to plug those too. > > WDYT? Ping.