From: "Ludovic Courtès" <ludo@gnu.org>
To: Guile Devel <guile-devel@gnu.org>
Cc: Andy Wingo <wingo@igalia.com>
Subject: Re-exporting a replaced binding
Date: Fri, 03 Jan 2020 19:30:34 +0100 [thread overview]
Message-ID: <87r20go0j9.fsf@inria.fr> (raw)
Hi again!
I’m not sure if this is an intended consequence of
cf08dbdc189f0005cab6f2ec7b23ed9d150ec43d, so I thought I’d share this
example of a practical effect:
--8<---------------cut here---------------start------------->8---
ludo@ribbon /tmp [env]$ cat x.scm
(define-module (x)
#:use-module (srfi srfi-1)
#:re-export (delete))
ludo@ribbon /tmp [env]$ cat y.scm
(define-module (y)
#:use-module (x))
(pk 'delete delete)
ludo@ribbon /tmp [env]$ guile -L . -c '(use-modules (y))'
WARNING: (y): imported module (x) overrides core binding `delete'
;;; (delete #<procedure delete (_ _ #:optional _)>)
ludo@ribbon /tmp [env]$ guile --version
guile (GNU Guile) 2.9.8
--8<---------------cut here---------------end--------------->8---
Here ‘delete’ is replaced by srfi-1, but the replaced bit is not
propagated to module (x), even though (x) simply re-exports it.
Should the #:re-export clause propagate the replace bit, or should
it not? :-)
(In Guile < 3.x, #:re-export would propagate the replace bit since that
bit was associated with the variable itself.)
Ludo’.
next reply other threads:[~2020-01-03 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-03 18:30 Ludovic Courtès [this message]
2020-01-04 15:57 ` Re-exporting a replaced binding Taylan Kammer
2020-01-05 10:03 ` Andy Wingo
2020-01-06 9:54 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r20go0j9.fsf@inria.fr \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
--cc=wingo@igalia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).