On Mon 31 Jan 2011 19:44, Noah Lavine <noah.b.lav...@gmail.com> writes:
> (define (codegen) > #`(let ((message "hello, world!\n")) > (display message))) > > (define-syntax test > (lambda (x) > (syntax-case x () > (_ (codegen))))) > > (test) > > Guile tried to compile test.scm, failed, and then interpreted it > correctly. Is that right? Yep; as mentioned in the NEWS entry, "** Functions needed by macros at expand-time need to be present at expand-time." I'm sure you know that already, and your real question: > is there a way to get more information about where the wrong-type-arg > error was thrown? There are several ways this could be improved: * The exception should be about an unbound variable, not about applying #f. I'll see what I can do there. * The exception could be printed with an appropriate printer. See http://thread.gmane.org/gmane.lisp.guile.devel/11066/focus=11158. * You should see the source location of the error and the containing forms. Probably that thread is the best bet for making a start at this. Regards, Andy -- http://wingolog.org/