unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: guile-user@gnu.org
Subject: Re: Module reflection and the list of bound symbols
Date: Sat, 29 Sep 2012 07:28:31 +0200	[thread overview]
Message-ID: <87obkpv1mo.fsf@zigzag.favinet> (raw)
In-Reply-To: <CAMFYt2bkn4fv84FCtJCnkU6EnG+CT-MMzOdghCzOTTZ=HH-KhQ@mail.gmail.com> (Panicz Maciej Godek's message of "Fri, 28 Sep 2012 19:37:17 +0200")

[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]

() Panicz Maciej Godek <godek.maciek@gmail.com>
() 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 #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2012-09-29  5:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 17:37 Module reflection and the list of bound symbols Panicz Maciej Godek
2012-09-29  5:28 ` Thien-Thi Nguyen [this message]
2012-09-30 13:21 ` Ian Price
2012-09-30 16:21   ` David Pirotte

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=87obkpv1mo.fsf@zigzag.favinet \
    --to=ttn@gnuvola.org \
    --cc=godek.maciek@gmail.com \
    --cc=guile-user@gnu.org \
    /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).