From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: Odd Behavior Date: Mon, 31 Jan 2011 14:20:00 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1296501615 28402 80.91.229.12 (31 Jan 2011 19:20:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 19:20:15 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 31 20:20:12 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 1PjzIH-0006uv-MS for guile-devel@m.gmane.org; Mon, 31 Jan 2011 20:20:09 +0100 Original-Received: from localhost ([127.0.0.1]:43572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzIH-0001nw-4P for guile-devel@m.gmane.org; Mon, 31 Jan 2011 14:20:09 -0500 Original-Received: from [140.186.70.92] (port=52994 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzIE-0001no-Fj for guile-devel@gnu.org; Mon, 31 Jan 2011 14:20:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjzIA-0002bK-09 for guile-devel@gnu.org; Mon, 31 Jan 2011 14:20:06 -0500 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:44617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjzI9-0002aJ-Ox for guile-devel@gnu.org; Mon, 31 Jan 2011 14:20:01 -0500 Original-Received: by yxl31 with SMTP id 31so2691102yxl.0 for ; Mon, 31 Jan 2011 11:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=EfL6L/wt8Mo9FBG+lZiqwpICikRvCf1YP/XC6XXQqlw=; b=RvrUDXxhoSyxLxduXVFQGV9DscdCLfjGWhCz9pYQX91NjHPBqFGbhDpMsV8hJuQyxW lKs1XQGmWWVZ8CFq5ZPqGDqDpESsYnkOnfdUCNybI7X70005dpxRY+HHjy/2e+vcoiUq S3Q9OYXJLSZE2uAblzZkYw2fWY7y4WM379xCo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=fc9QnAOZmQgC1FhsM9Tjh8SriYvM0AOJ+fi+g/TcRFK7klZHPKzu26KTsqesIFDjvA 9ld7HSAMVXYW8Fe9ZqesosIt6O8Xi8BPBCQajshKZ2+oyTxF8aM6GhUagXKux2Xp4elT jrVWxmzIQRhgcaIkFlcGbz8Z9aQn3hqvYgph0= Original-Received: by 10.150.96.20 with SMTP id t20mr4658252ybb.237.1296501600677; Mon, 31 Jan 2011 11:20:00 -0800 (PST) Original-Received: by 10.147.136.20 with HTTP; Mon, 31 Jan 2011 11:20:00 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: N4vY8CELp0qo1GqwKzaEeZMQW7I X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 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:11449 Archived-At: Hello again, I tried finding the error by running compile-file, but I got the following Guile session: scheme@(guile-user)> (compile-file "test.scm") ice-9/boot-9.scm:119:21: Wrong type to apply: #f Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user)> ,bt Nothing to debug. boot-9.scm:119 is in the definition of custom-throw-handler, which is part of the implementation of catch. Noah On Mon, Jan 31, 2011 at 1:44 PM, Noah Lavine wrot= e: > Hello all, > > I ran into an error message in Guile, and I'm not sure how to track > down the cause of it. I used a file called test.scm with the following > contents: > > #!guile > !# > > (define (codegen) > =A0#`(let ((message "hello, world!\n")) > =A0 =A0 =A0(display message))) > > (define-syntax test > =A0(lambda (x) > =A0 =A0(syntax-case x () > =A0 =A0 =A0(_ (codegen))))) > > (test) > > Then I opened guile and did (load "test.scm"), and got this: > > ;;; compiling test.scm > ;;; WARNING: compilation of test.scm failed: > ;;; key wrong-type-arg, throw_args (#f "Wrong type to apply: ~S" (#f) (#f= )) > hello, world! > > As far as I can tell, this means that Guile tried to compile test.scm, > failed, and then interpreted it correctly. Is that right? If so, is > there a way to get more information about where the wrong-type-arg > error was thrown? > > I'd also love to know any way to get more information about errors > that happen during macroexpansion in general. I've been having quite a > bit of trouble figuring out what is going wrong at different points in > peg.scm, while I'm trying to convert it to syntax-case. > > Thanks, > Noah >