guile-devel
[Top][All Lists]
Advanced

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

Odd Behavior


From: Noah Lavine
Subject: Odd Behavior
Date: Mon, 31 Jan 2011 13:44:28 -0500

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]