[Top][All Lists]

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

Re: First look at Guile Std Library available

From: Paul Jarc
Subject: Re: First look at Guile Std Library available
Date: Tue, 06 Jan 2004 16:20:02 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Richard Todd <address@hidden> wrote:
>>> (set-module-uses! %module-public-interface
>>>                   (list (nested-ref the-root-module '(app modules std slib
>>> symbol-that-is-provided))))
> I'm going to start investigating this in the guile code taday, but I
> thought I'd ask again in case someone can just tell me: What does
> that set-module-uses!  expression quoted above mean?  I assume this
> is attempting to export the slib functions that were just
> 'require'd, right?

First, the nested-ref call resolves a name in the module hierarchy.
For example:
guile> (nested-ref the-root-module '(app modules srfi srfi-1))
#<directory (srfi srfi-1) 8085b90>
guile> (nested-ref the-root-module '(app modules srfi srfi-1 map))
#<procedure map (f list1 . rest)>

set-module-users! modifies %module-public-interface (i.e., the public
interface of the current module, where names are searched for by code
that uses this module) so that if something tries to look up a name in
%module-public-interface and it isn't directly there, then the search
will continue in the (list ...)  given.  But you might be better off
with module-use! than set-module-uses!.  See ice-9/boot-9.scm.


reply via email to

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