GNU bug report logs - #67255
define-library does not support 'rename' directives

Previous Next

Package: guile;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Sat, 18 Nov 2023 05:47:01 UTC

Severity: normal

Tags: patch

Full log


Message #8 received at 67255 <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 67255 <at> debbugs.gnu.org
Subject: Re: bug#67255: define-library does not support 'rename' directives
Date: Mon, 20 Nov 2023 09:53:10 -0600
Hi Maxim,

Maxim Cournoyer <maxim.cournoyer <at> gmail.com> writes:

> Our R7RS define-library syntax, from (ice-9 r7rs-library) does not
> support renaming bindings to export, via 'rename' directives.

I appreciate your R7RS debugging effort.  Thanks!

> Our define-module syntax does not have such a feature (of renaming
> *exported* bindings), so this would seem to require new development on
> that side first.

I believe you’re mistaken.  At least, the manual says:

 -- syntax: export variable ...
     Add all VARIABLEs (which must be symbols or pairs of symbols) to
     the list of exported bindings of the current module.  If VARIABLE
     is a pair, its ‘car’ gives the name of the variable as seen by the
     current module and its ‘cdr’ specifies a name for the binding in
     the current module’s public interface.

Using pairs in Guile’s ‘export’ (or ‘#:export’ in ‘define-module’)
should be the same as ‘rename’ from R7RS.

HTH!


-- Tim




This bug report was last modified 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.