From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Odd Behavior Date: Mon, 31 Jan 2011 20:41:17 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296502596 1376 80.91.229.12 (31 Jan 2011 19:36:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 19:36:36 +0000 (UTC) Cc: guile-devel@gnu.org To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 31 20:36:31 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjzY6-0007S4-IO for guile-devel@m.gmane.org; Mon, 31 Jan 2011 20:36:30 +0100 Original-Received: from localhost ([127.0.0.1]:47791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzY6-0006pt-1v for guile-devel@m.gmane.org; Mon, 31 Jan 2011 14:36:30 -0500 Original-Received: from [140.186.70.92] (port=55126 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzXz-0006nw-Jq for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjzXv-0006I2-QM for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:23 -0500 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:50302 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjzXv-0006Hs-MS for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:19 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 3F4B4368F; Mon, 31 Jan 2011 14:37:11 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=7WBFNi1cdCCsQ0HuJLv8sHPpLNM=; b=AgFrXk urOPVDXrdKXbgZ7+0vHrV2sc6zvCu98YtBT40mt6NrOT1ImPnAZ8Mc4rNno1QIQp YglLBX8P0YZ6poOB+VDnp7nwApYcyF5YrLj1+EQ64LFeCQZKAd3s4Oac1+IgOwaE JdR7ZG4po1Bapj8R1tSGl20mnwRMvdPIgE9oQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=FoBaQ6DVG9qyPBzGxXohYyqn0hGfhSHA pPfxvlvHT5e48iJpbbQBWJbPYVAlPc/FcExFvPvMKsrmgJEuRTiRJIRRRswZwYLF EibIgQxnlb/Xbw5pT5bcls+95sTEKb8rCRs9i42dkY9M/yK89baAFc25X1orJwV4 18kyHQcdW1w= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 2CABB368E; Mon, 31 Jan 2011 14:37:10 -0500 (EST) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id 8A1923684; Mon, 31 Jan 2011 14:37:08 -0500 (EST) In-Reply-To: (Noah Lavine's message of "Mon, 31 Jan 2011 13:44:28 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 7EB4BC12-2D71-11E0-A7C9-D23C02851FFE-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11452 Archived-At: On Mon 31 Jan 2011 19:44, Noah Lavine 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/