guile-devel
[Top][All Lists]
Advanced

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

Re: Odd Behavior


From: Noah Lavine
Subject: Re: Odd Behavior
Date: Mon, 31 Jan 2011 14:36:37 -0500

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 <address@hidden> wrote:
> 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 <address@hidden> wrote:
>> 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)
>>  #`(let ((message "hello, world!\n"))
>>      (display message)))
>>
>> (define-syntax test
>>  (lambda (x)
>>    (syntax-case x ()
>>      (_ (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
>>
>



reply via email to

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