[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macro expand in a specified module
From: |
Marius Vollmer |
Subject: |
Re: macro expand in a specified module |
Date: |
13 Mar 2001 18:51:06 +0100 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7 |
Keisuke Nishida <address@hidden> writes:
> I'd like to expand a macro in a specified module.
> The following procedure does it:
> [...]
>
> May I add this to ice-9.scm? I think this procedure looks good
> because it is symmetry to eval.
Who would be using this procedure? I think it is only useful for
debugging purposes. I does something different from what the
evaluator does, so it might even be misleading.
In what way is `expand' different from
(define (macroexpand-in-module exp mod)
(save-module-excursion
(lambda ()
(set-current-module mod)
(macroexpand exp))))
or (at the repl)
guile> (define-module mod)
guile> (macroexpand exp)
I think the above is easy enough so that everybody who needs this can
define it themselves.
I don't think we should add new stuff to the existing module system
mess if we can avoid it. It might get in the way when moving to a
saner module system.