GNU bug report logs - #17502
R6RS `library' form must have exports before imports

Previous Next

Package: guile;

Reported by: Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com>

Date: Thu, 15 May 2014 21:03:01 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark H Weaver <mhw <at> netris.org>
To: Taylan Ulrich Bayirli/Kammer <taylanbayirli <at> gmail.com>
Cc: 17502 <at> debbugs.gnu.org
Subject: bug#17502: R6RS `library' form must have exports before imports
Date: Wed, 04 Jun 2014 21:24:28 -0400
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




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.