From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Taylan Ulrich Bayirli/Kammer Newsgroups: gmane.lisp.guile.bugs Subject: bug#17502: R6RS `library' form must have exports before imports Date: Thu, 15 May 2014 23:02:25 +0200 Message-ID: <8738ga7o2m.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1400187797 1308 80.91.229.3 (15 May 2014 21:03:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 May 2014 21:03:17 +0000 (UTC) To: 17502@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu May 15 23:03:10 2014 Return-path: Envelope-to: guile-bugs@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 1Wl2o0-0002Ux-Jf for guile-bugs@m.gmane.org; Thu, 15 May 2014 23:03:08 +0200 Original-Received: from localhost ([::1]:60460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2o0-0003GK-5i for guile-bugs@m.gmane.org; Thu, 15 May 2014 17:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2nw-0003Fd-8m for bug-guile@gnu.org; Thu, 15 May 2014 17:03:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wl2nu-0007WW-Hl for bug-guile@gnu.org; Thu, 15 May 2014 17:03:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2nu-0007WR-Ev for bug-guile@gnu.org; Thu, 15 May 2014 17:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wl2nu-0001ci-24 for bug-guile@gnu.org; Thu, 15 May 2014 17:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Taylan Ulrich Bayirli/Kammer Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 15 May 2014 21:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17502 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14001877666211 (code B ref -1); Thu, 15 May 2014 21:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 May 2014 21:02:46 +0000 Original-Received: from localhost ([127.0.0.1]:36415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wl2nd-0001c6-OB for submit@debbugs.gnu.org; Thu, 15 May 2014 17:02:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56485) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wl2na-0001bq-Vs for submit@debbugs.gnu.org; Thu, 15 May 2014 17:02:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wl2nV-0007R6-0K for submit@debbugs.gnu.org; Thu, 15 May 2014 17:02:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:32949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2nU-0007R2-Tx for submit@debbugs.gnu.org; Thu, 15 May 2014 17:02:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2nU-0003F6-18 for bug-guile@gnu.org; Thu, 15 May 2014 17:02:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wl2nS-0007QX-Ux for bug-guile@gnu.org; Thu, 15 May 2014 17:02:35 -0400 Original-Received: from mail-ee0-x22f.google.com ([2a00:1450:4013:c00::22f]:57334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wl2nS-0007QE-N4 for bug-guile@gnu.org; Thu, 15 May 2014 17:02:34 -0400 Original-Received: by mail-ee0-f47.google.com with SMTP id c13so992288eek.20 for ; Thu, 15 May 2014 14:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject:mime-version:content-type; bh=U3k2HuRKlJv7ZOuTQg/lCoLsYI4NU860rJ1way3Spas=; b=QPJLCmyCcYDY1gljRhSKcHnYNXMyskPjqRlpLfPRKCzrmO0rZdlQpbr/JDwCgfEeC8 0ZpjqtCWx0wgH36EDufv+V52O094+MCjn8IkUcImLOLKLgZuI477r2CfwSj8BbPkt50g BsXwawZ1mc3F/Z4XKO/fnNuqMmv7CjjHVKnUor9UAiw2PYhnJDXO72kzZ6HsvtmnQHV+ fpnkm2B+Rd3tHgUXsLo5VwvXULMV466HU1pdhunoyh80AAuoU3QkgTmPthPRl7h25TGV x8/T1p6nW8KaXgVkqOBKqkRbd0J4Q1FKm6DP6dVuNpG6T1UEZJIxDwxhQmEJH2IVpQIN BBAg== X-Received: by 10.15.26.135 with SMTP id n7mr6072339eeu.71.1400187753208; Thu, 15 May 2014 14:02:33 -0700 (PDT) Original-Received: from taylan.uni.cx (p200300514A8630A00213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a86:30a0:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id h6sm15150011eew.38.2014.05.15.14.02.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 May 2014 14:02:32 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7460 Archived-At: --=-=-= Content-Type: text/plain The R6RS `library' form requires the (export ...) list to appear before the (import ...) list. I'm not sure if this itself is a bug; R6RS consistently uses that order, doesn't mention the order to be irrelevant, and seems to me to imply that it's indeed mandatory. I didn't check for what other R6RS implementations do though. Here's a corresponding documentation patch against master/3be43fb: --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-R6RS-library-documentation-fix.patch >From 7900da779f1ab267481ad1a08a0547083936d11f Mon Sep 17 00:00:00 2001 From: Taylan Ulrich B Date: Thu, 15 May 2014 22:55:40 +0200 Subject: [PATCH] R6RS library documentation fix * doc/ref/api-modules.texi: In the R6RS `library' form, exports must appear before imports. --- doc/ref/api-modules.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi index 286a37d..47171c6 100644 --- a/doc/ref/api-modules.texi +++ b/doc/ref/api-modules.texi @@ -584,8 +584,8 @@ expression: @lisp (library (mylib (1 2)) - (import (otherlib (3))) - (export mybinding)) + (export mybinding) + (import (otherlib (3)))) @end lisp is equivalent to the module definition: @@ -597,6 +597,8 @@ is equivalent to the module definition: #:export (mybinding)) @end lisp +Note that exports must appear before imports in the `library' form. + Central to the mechanics of R6RS libraries is the concept of import and export @dfn{levels}, which control the visibility of bindings at various phases of a library's lifecycle --- macros necessary to -- 1.8.4 --=-=-=--