This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Calling define within define-syntax
- From: Per Bothner <per at bothner dot com>
- To: Chris Dean <ctdean at sokitomi dot com>
- Cc: Kawa List <kawa at sources dot redhat dot com>
- Date: Thu, 16 Sep 2004 01:52:35 -0700
- Subject: Re: Calling define within define-syntax
- References: <878ybaipz4.fsf@mercedsystems.com>
Chris Dean wrote:
Didn't this used to work?
(define-syntax define*
(syntax-rules ()
((define* (name arg ...) body ...)
(define (name arg ... )
(format #t "--- start ~S~%" name)
(let ((res (begin body ...)))
(format #t "--- end ~S~%" name)
res)))))
(define* (fact n)
(if (< n 2)
1
(* n (fact (- n 1)))))
Hm. It doesn't work for me either, and I don't offhand knwo why.
I'll take a look. (Note I'll be travelling/vacationing for a week,
but I do expect to spend some time hacking on Kawa while I'm gone.
I should have email access most of the time.)
(I assume you know about the trace/untrace forms?)
--
--Per Bothner
per@bothner.com http://per.bothner.com/