guile-devel
[Top][All Lists]
Advanced

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

Hierarchical name space


From: Ludovic Courtès
Subject: Hierarchical name space
Date: Wed, 31 Mar 2010 22:42:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Hey,

Andy Wingo <address@hidden> writes:

> Also in every module that has submodules, like (language tree-il) and
> (language tree-il compile-glil), the "supermodule" has a binding for the
> submodule. Do a (module-ref (resolve-module '(ice-9)) 'threads)
> sometime.

I think I found a possible use case for the hierarchical name space.  :-)

Suppose we want something like PLaneT or Eggs, let’s call it GUMM
(Guile’s Unified Module Machinery).  Ideally, we’d want to be able to
write this:

  (use-modules (gumm foo bar))

Such that:

  - If a (foo bar) module exists locally, it is used

  - else if ftp://example.org/gumm/foo/bar.scm exists it is downloaded
    and ‘resolve-interface’d

  - else an error is raised.

The hierarchical name space allows the (gumm) module to have a lazy
binder procedure that will catch all such lookups so that it can
actually do its job.  QED?

Thanks,
Ludo’.





reply via email to

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