[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re-exporting a replaced binding
From: |
Ludovic Courtès |
Subject: |
Re-exporting a replaced binding |
Date: |
Fri, 03 Jan 2020 19:30:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
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’.
- Re-exporting a replaced binding,
Ludovic Courtès <=