From: Dale Smith <dalepsmith@gmail.com>
To: Leo Prikler <leo.prikler@student.tugraz.at>
Cc: 43025@debbugs.gnu.org
Subject: bug#43025: re-export-public-interface fails on Guile 3
Date: Fri, 28 Aug 2020 15:22:17 -0400 [thread overview]
Message-ID: <CAFGZJC4LuaAEPEaJLqQe36qeMuAJ3SVJtKW4OGaWdH2dKgeSdA@mail.gmail.com> (raw)
In-Reply-To: <CAFGZJC5Px87QjeJV0UQkyDKtvf39SWE0sOCOAuxwC1Fb76J_vg@mail.gmail.com>
And now using a more standard error reporting function.
I think it's done now.
(define-syntax re-export-public-interface
(syntax-rules ()
"Re-export the public interface of a module or modules. Invoked as
@code{(re-export-public-interface (mod1) (mod2) ...)}."
((_ (m0 m0* ...) (mn mn* ...) ...)
(let ((iface (module-public-interface (current-module))))
(define (r-e-p-i module)
(cond-expand
(guile-3
(module-for-each
(lambda (sym val)
(hashq-set! (module-replacements iface) sym #t)
(module-add! iface sym val))
(resolve-interface module)))
(else
(module-use! iface (resolve-interface module)))))
(r-e-p-i '(m0 m0* ...))
(r-e-p-i '(mn mn* ...))
...))
((_)
(syntax-error "must provide one or more module names"))
((_ m m* ...)
(syntax-error "module names must look like lists"))))
next prev parent reply other threads:[~2020-08-28 19:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 16:11 bug#43025: re-export-public-interface fails on Guile 3 Dale Smith
2020-08-24 19:50 ` Leo Prikler
2020-08-26 16:51 ` Dale Smith
2020-08-26 17:06 ` Leo Prikler
2020-08-27 2:21 ` Dale Smith
2020-08-28 0:12 ` Dale Smith
2020-08-28 19:22 ` Dale Smith [this message]
2021-03-12 14:12 ` Dale Smith
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=CAFGZJC4LuaAEPEaJLqQe36qeMuAJ3SVJtKW4OGaWdH2dKgeSdA@mail.gmail.com \
--to=dalepsmith@gmail.com \
--cc=43025@debbugs.gnu.org \
--cc=leo.prikler@student.tugraz.at \
/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).