guile-user
[Top][All Lists]
Advanced

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

Re: guile and XML (mixp)


From: Ludovic Courtès
Subject: Re: guile and XML (mixp)
Date: Tue, 28 Nov 2006 09:43:23 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

Neil Jerram <address@hidden> writes:

> What seems very reasonable, however, would be a way for a module to
> discover whether it is being loaded for use-syntax or use-module, so
> that it can emit a warning, or even signal an error, if the use is
> inappropriate.
>
> Perhaps something like this...
>
>  (define-module (ice-9 syncase)
>    ...
>    #:use-hook my-use-hook)
>
>  (define (my-use-hook usage)
>    (or (eq? usage #:use-syntax)
>        (error "The (ice-9 syncase) module should always be used by
>    calling (use-syntax ...), not (use-modules ...)")))
>
>  ...
>
> Does that sound reasonable?

I'm not sure extending `define-module' just to solve this specific
problem is a good idea.  In particular, `use-syntax' itself doesn't seem
too reasonable (see [0]).  Thus, in the long-term, it may be preferable
to remove `use-syntax' or replace it with more robust primitives, rather
than working around it.

Thanks,
Ludovic.

[0] http://lists.gnu.org/archive/html/guile-devel/2006-07/msg00019.html




reply via email to

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