guile-user
[Top][All Lists]
Advanced

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

Re: Two questions about the guile module system


From: Marius Vollmer
Subject: Re: Two questions about the guile module system
Date: 31 Mar 2003 17:08:57 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Joris van der Hoeven <address@hidden> writes:

> > What about:
> > 
> >      module.scm
> >  
> >     (define-module (module)
> >           :use-module (library))
> > 
> >     ...
> >     (foo)
> >     ...
> > 
> > This way, 'module' says explicitely that it is using bindings from
> > 'library'.
> 
> That is precisely what I do not want to do. The point is that
> I have not one library module, but dozens of them. I do not want
> to respecify all of them over and over again.

Then what about making a new macro that does this speciying for you?

For example:

    (define-macro (define-my-module name . rest)
      `(define-module ,name
         :use-module (library)
         ,@rest))

You then only need to make sure that 'define-my-module' is available
in the current module when you load a file that uses it.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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