This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Strange error output for undefined macros inside macros



When evaluating the following


"
(define-macro (foo)
  (foobar))
(define-macro (foobar)
  (display 520))
(foo)
"

I get the following error:

"Argument (#<macro foobar>) to 'apply-to-args' has wrong type (kawa.lang.Macro) (expected: procedure)"

It took me a long time to figure out that foobar needed to be evaluated
before foo. (of course, I didn't have this small example then. :-) )

Perhaps it would be better to say something like "The foobar macro needs
to be defined before defining foo" instead?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]