[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How could this be implemented?
From: |
Ludovic Courtès |
Subject: |
Re: How could this be implemented? |
Date: |
Wed, 17 Jan 2007 09:30:59 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
Jon Wilson <address@hidden> writes:
> Thanks for the pointer. Do you know of any documentation on module
> binder procs? I've looked in the manual and, (as usual) it doesn't
> really say much of anything about them.
First, I think the "as usual" is a bit unfair. ;-)
Second, if you use undocumented stuff, keep in mind that they may change
without prior notice.
Third, you may want to look at `boot-9.scm' for examples of binder
procedures. Basically, each module can define a binder procedure (using
`set-module-binder!' or as an argument to `module-constructor') that is
called whenever a symbol lookup is not satisfied by the module's symbol
table (its "obarray"). When invoked, that binder is passed three
arguments: the module, the symbol being looked up, and a boolean
indicating whether that symbol is to be defined or just looked up. See,
for instance, `make-autoload-interface' (in 1.8) for an example (or
Andy's link).
Hope this helps,
Ludovic.
PS: FWIW, I'm also not convinced that this is the right approach to
implementing shell-like constructs in Guile.
Re: How could this be implemented?, Andy Wingo, 2007/01/15