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]

Re: CL macro problems


So the short answer to my question is don't use defmacro :)
http://sourceware.org/ml/kawa/2006-q4/msg00020.html

Boris

On 7/11/07, Boris Mizhen - 迷阵 <boris@boriska.com> wrote:
Hi all,

why does this work:
# (defmacro aa ()  '(+ 1 2))
# (aa)
3

and this works:
# (java.lang.Object:new)
java.lang.Object@1346e64

But this does not?

# (defmacro aa ()  '(java.lang.Object:new))
(defmacro aa ()  '(java.lang.Object:new))
# (aa)
(aa)
/dev/stdin:229:19: unbound location java.lang.Object:new
        at gnu.expr.ReferenceExp.apply(ReferenceExp.java:136)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
        at gnu.mapping.CallContext.getFromContext(CallContext.java:280)
        at gnu.expr.Expression.eval(Expression.java:24)
        at gnu.expr.ApplyExp.apply(ApplyExp.java:63)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:205)
        at kawa.Shell.run(Shell.java:230)
        at kawa.Shell.run(Shell.java:172)
        at kawa.Shell.run(Shell.java:159)
        at kawa.TelnetRepl.apply0(TelnetRepl.java:23)
        at gnu.mapping.RunnableClosure.run(RunnableClosure.java:105)
        at gnu.mapping.Future.run(Future.java:40)

Thanks!


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