guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd Behavior


From: Andy Wingo
Subject: Re: Odd Behavior
Date: Mon, 31 Jan 2011 20:41:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

On Mon 31 Jan 2011 19:44, Noah Lavine <address@hidden> 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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]