On Sat, Feb 12, 2011 at 4:51 PM, Peter Bex
<address@hidden> wrote:
On Sat, Feb 12, 2011 at 04:35:23PM -0500, Patrick Li wrote:
>
> I have a *very* ugly workaround right now.
> I define the convenience function twice. Once normally. And again within a
> begin-for-syntax form.
You can do the same trick as before:
(module module-a (convenience-function)
(import chicken scheme)
(define (convenience-function)
(display "do convenience things\n")))
(module module-b (my-macro convenience-function)
(import chicken scheme module-a)
(import-for-syntax module-a)
(define-syntax my-macro
(lambda (_expression_ rename comparison)
(convenience-function)
"My Macro Output")))
This imports module-a (which can be internal and nobody has to know it's
there) both for syntax and normally, and then re-exports the convenience
function.
Yes, this is ugly.
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users