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:36:37 -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 1296502615 1460 80.91.229.12 (31 Jan 2011 19:36:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2011 19:36:55 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jan 31 20:36:48 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 1PjzYK-0007aV-MD for guile-devel@m.gmane.org; Mon, 31 Jan 2011 20:36:44 +0100 Original-Received: from localhost ([127.0.0.1]:47972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzYK-0006x4-3C for guile-devel@m.gmane.org; Mon, 31 Jan 2011 14:36:44 -0500 Original-Received: from [140.186.70.92] (port=55252 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjzYF-0006vk-Qd for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjzYE-0006Lm-LY for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:39 -0500 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:63446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjzYE-0006LZ-Iv for guile-devel@gnu.org; Mon, 31 Jan 2011 14:36:38 -0500 Original-Received: by gxk5 with SMTP id 5so2735251gxk.0 for ; Mon, 31 Jan 2011 11:36:37 -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=fiRV937lMUCd3pCt/b5YMpL+0r30gz9n63Y/fWEPytY=; b=hxpRfSdc0IKdcp5vl+AJDxaFUsc3QTaqpJB0Zlsx2HTgNl1h6Oiv1FdmRwMlUbQVYF vGulmj+52c3/M9G4u44RU5FIvvCeT5wiRQQLSIw4w6p3Kd3B4advo5PBeNbE+x6Ey73g l7YrBmmlwSEapOzi9oErbMl1QO5TvayH48mm8= 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=QCYII8wOupT5QcuVS16OOXhG7qtSuIYe3CsHL0fgMyjZxiqO/yDzNE8xBKZv5yS2Gd ZunEGnp33R/CpFu3vcriJVMCG/kOcrRpwDma95yxawKTZVSWWVfBahM/yy6+4vvcRZxp p/msmdX0ZGcpXT7Rx7rBxY/SxK5LjAxBv9GaE= Original-Received: by 10.151.111.17 with SMTP id o17mr8470840ybm.294.1296502597703; Mon, 31 Jan 2011 11:36:37 -0800 (PST) Original-Received: by 10.147.136.20 with HTTP; Mon, 31 Jan 2011 11:36:37 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: GRV2DH2Exya7K2Uwq02BCeZHljs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.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:11453 Archived-At: Oh, sorry. I solved that problem (it needed an eval-when). That might also suggest some solutions to peg.scm oddness. I'd still be interested in any tips on debugging macros, though. Thanks, Noah On Mon, Jan 31, 2011 at 2:20 PM, Noah Lavine wrot= e: > 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. =A0Type `,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 wr= ote: >> 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 >> >