GNU bug report logs - #43025
re-export-public-interface fails on Guile 3

Previous Next

Package: guile;

Reported by: Dale Smith <dalepsmith <at> gmail.com>

Date: Mon, 24 Aug 2020 16:12:01 UTC

Severity: normal

Done: Dale Smith <dalepsmith <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dale Smith <dalepsmith <at> gmail.com>
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Cc: 43025 <at> debbugs.gnu.org
Subject: bug#43025: re-export-public-interface fails on Guile 3
Date: Fri, 28 Aug 2020 15:22:17 -0400
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"))))




This bug report was last modified 4 years and 157 days ago.

Previous Next


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