GNU bug report logs -
#17502
R6RS `library' form must have exports before imports
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17502 in the body.
You can then email your comments to 17502 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#17502
; Package
guile
.
(Thu, 15 May 2014 21:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Thu, 15 May 2014 21:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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:
[0001-R6RS-library-documentation-fix.patch (text/x-diff, attachment)]
Information forwarded
to
bug-guile <at> gnu.org
:
bug#17502
; Package
guile
.
(Fri, 16 May 2014 03:13:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 17502 <at> debbugs.gnu.org (full text, mbox):
---- Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com> wrote:
> 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.
From http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-10.html#node_sec_7.1 :
A library definition must have the following form:
(library <library name>
(export <export spec> ...)
(import <import spec> ...)
<library body>)
Seems unambiguous to me.
-Dale
Information forwarded
to
bug-guile <at> gnu.org
:
bug#17502
; Package
guile
.
(Thu, 05 Jun 2014 01:25:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 17502 <at> debbugs.gnu.org (full text, mbox):
Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com> writes:
> The R6RS `library' form requires the (export ...) list to appear
> before the (import ...) list.
Indeed, good catch!
> Here's a corresponding documentation patch against master/3be43fb:
We will want to apply this to stable-2.0.
> From 7900da779f1ab267481ad1a08a0547083936d11f Mon Sep 17 00:00:00 2001
> From: Taylan Ulrich B <taylanbayirli <at> gmail.com>
> 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.
The changelog should briefly describe the changes made. Also, when
making changes to texi files, our convention is to include the node name
in parentheses before the colon. So maybe something like this:
* doc/ref/api-modules.texi (R6RS Libraries): Move 'export' before
'import' in the example library form, as required by the R6RS.
> ---
> 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.
> +
I don't think we need to mention this. IMO the R6RS is quite clear, as
Dale pointed out.
Thanks!
Mark
Information forwarded
to
bug-guile <at> gnu.org
:
bug#17502
; Package
guile
.
(Thu, 05 Jun 2014 17:33:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 17502 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Mark, thanks for the comments. :-)
Here the improved patch, against stable-2.0/73ff8e3:
[0001-R6RS-library-documentation-fix.patch (text/x-diff, inline)]
From 73ff8e3d19430f305a44cce839a588f68a0704d1 Mon Sep 17 00:00:00 2001
From: Taylan Ulrich B <taylanbayirli <at> gmail.com>
Date: Thu, 5 Jun 2014 19:27:53 +0200
Subject: [PATCH] R6RS library documentation fix
* doc/ref/api-modules.texi (R6RS Libraries): Move 'export' before
'import' in the example library form, as required by R6RS.
---
doc/ref/api-modules.texi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/ref/api-modules.texi b/doc/ref/api-modules.texi
index 286a37d..0f54e01 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:
--
1.8.4
Reply sent
to
Mark H Weaver <mhw <at> netris.org>
:
You have taken responsibility.
(Fri, 06 Jun 2014 20:41:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 06 Jun 2014 20:41:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 17502-done <at> debbugs.gnu.org (full text, mbox):
Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com> writes:
> Here the improved patch, against stable-2.0/73ff8e3:
Pushed, thanks!
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 05 Jul 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 356 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.