From: Andy Wingo <wingo@pobox.com>
To: Noah Lavine <noah.b.lavine@gmail.com>
Cc: guile-devel@gnu.org
Subject: Re: Odd Behavior
Date: Mon, 31 Jan 2011 20:41:17 +0100 [thread overview]
Message-ID: <m3lj20yi76.fsf@unquote.localdomain> (raw)
In-Reply-To: <AANLkTi=uxT3z1WgV5jcr=bQ_YOuC8u3QocaOqBO8MNag@mail.gmail.com> (Noah Lavine's message of "Mon, 31 Jan 2011 13:44:28 -0500")
On Mon 31 Jan 2011 19:44, Noah Lavine <noah.b.lavine@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/
next prev parent reply other threads:[~2011-01-31 19:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 18:44 Odd Behavior Noah Lavine
2011-01-31 19:20 ` Noah Lavine
2011-01-31 19:36 ` Noah Lavine
2011-01-31 19:41 ` Andy Wingo [this message]
2011-01-31 20:12 ` Andy Wingo
2011-01-31 20:09 ` Noah Lavine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3lj20yi76.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=noah.b.lavine@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).