;; -*- mode: scheme; coding: utf-8 -*- ;;;; Copyright (C) 2011, 2012 ;;;; Free Software Foundation, Inc. ;;;; This library is free software: you can redistribute it and/or ;;;; modify it under the terms of the GNU General Public License as ;;;; published by the Free Software Foundation, either version 3 of ;;;; the License, or (at your option) any later version. ;;;; This library is distributed in the hope that it will be useful, but ;;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;;;; General Public License for more details. ;;;; You should have received a copy of the GNU General Public License ;;;; along with this library. If not, see . ;;;; ;;; Commentary: ;; this code is the same as the one use by guile-gnome, see ;; /usr/local/share/guile-gnome-2/gnome/gw/support/modules.scm ;;; Code: (define-module (macros reexport) :export (re-export-public-interface)) (define-macro (re-export-public-interface . args) "Re-export the public interface of a module or modules. Invoked as @code{(re-export-modules (mod1) (mod2)...)}." (if (null? args) '(if #f #f) `(begin ,@(map (lambda (mod) (or (list? mod) (error "Invalid module specification" mod)) `(module-use! (module-public-interface (current-module)) (resolve-interface ',mod))) args))))