[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macros, procedure->macro
From: |
Marius Vollmer |
Subject: |
Re: macros, procedure->macro |
Date: |
13 Jul 2002 20:38:44 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Dirk Herrmann <address@hidden> writes:
> I have decided for the solution above to avoid having to export an
> additional binding.
I hope that we can avoid exporting bindings that are only used in
macro expansions. I don't know exactly how (ice-9 syncase) deals with
this right now, but I'd say it is supposed to make the following work:
(define-module (t1)
:use-syntax (ice-9 syncase)
:export-syntax foo)
(define (bar) #t)
(define-syntax foo
(syntax-rules ()
((foo)
(bar))))
(define-module (t2)
:use-syntax (ice-9 syncase)
:use-module (t1))
(foo)
Note that (t1) doesn't export bar, but the expansion of (foo) uses it.
I have some vague ideas of how to implement this... the basic one is
to add new syntax that allows one to refer to specific bindings from
specific modules, on a very low level. For example, we could use
(#:module-ref (t1) bar)
to get at the bar binding of the (t1) module, from anywhere. Note
that we use a keyword in the operator position.
(ice-9 syncase) could then rewrite references to global variables to
use this form.
- Re: macros, procedure->macro, (continued)
Re: macros, procedure->macro, Dirk Herrmann, 2002/07/03
- Re: macros, procedure->macro, Dirk Herrmann, 2002/07/04
- Re: macros, procedure->macro, Dirk Herrmann, 2002/07/10
- Re: macros, procedure->macro, Dirk Herrmann, 2002/07/13
- Re: macros, procedure->macro,
Marius Vollmer <=