[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Module reflection and the list of bound symbols
From: |
David Pirotte |
Subject: |
Re: Module reflection and the list of bound symbols |
Date: |
Sun, 30 Sep 2012 13:21:06 -0300 |
Hello,
> ... to get only the public (exported) ones using the
> interfaces, but that is beyond my knowledge at the moment.
Here is what i do, see the attached code [which i copied from
guile-gnome], then you can use it this way, as an example:
1. you define a module b and export some ...
2.
;;; file a.scm STARTS here
(define-module (a)
:use-module (reexport)
:use-module (b))
:export ... ...
(eval-when (compile load eval)
(re-export-public-interface (b)))
;; your code here...
;; ...
;;; file a.scm ENDS here
3.
finally:
guile
scheme@(guile-user)> (use-modules (a))
;; then you can use both public interface from a and b
Of course this is true for any module which uses the module a [it can
refers to the public interface of b too...]
Hope this helps,
Cheers,
David
ps: i have always tought guile itself should provide this feature as
built-in
reexport.scm
Description: Text Data