guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Module reflection and the list of bound symbols


From: Thien-Thi Nguyen
Subject: Re: Module reflection and the list of bound symbols
Date: Sat, 29 Sep 2012 07:28:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

() Panicz Maciej Godek <address@hidden>
() Fri, 28 Sep 2012 19:37:17 +0200

   (Or maybe I just overlooked something, and they are already
   available?)

Check out ‘(ice-9 session) apropos’ to see what it does.  In Guile 1.4,
one of its subroutines:

(define apropos-fold-exported
  (make-fold-modules root-modules submodules
                     (lambda (fob)
                       (fob-info fob #:public-interface))))

uses ‘fob-info ... #:public-interface’, which was the result of long
past (but still memorably pleasant) "separation of concerns" hacking
(see <http://www.gnuvola.org/software/guile/doc/Module-Monkey.html>).
Anyway, the important bit is that "public-interface" derives from the
procedure ‘module-public-interface’, present in other Guile versions.

Probably you want to explore the ancestor of ‘fob-info ... #:obarray’,
instead, to access the full set of bindings (not just public), but i
didn't mention that because the code that uses it in Guile 1.4 ‘(ice-9
session)’ is long and the Guile module system is somewhat of a rats nest
[insert maniacal laughter, here :-D]...  Same thinking applies, however.

-- 
Thien-Thi Nguyen ..................................... GPG key: 4C807502
.                  NB: ttn at glug dot org is not me                   .
.                 (and has not been since 2007 or so)                  .
.                        ACCEPT NO SUBSTITUTES                         .
........... please send technical questions to mailing lists ...........

Attachment: pgpSsGMpYIjhT.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]