Re: Macro problems with delay

2010-09-10 Thread Cyrus Harmon
This still doesn't quite add up to me. What's the consequence of not alter-var-root'ing maker-var# if def-form is a defmacro? Why would def-form be a defmacro in the first place? Also, I don't think you've given the example of the actual call that gave the error, only the macroexpansion of it.

Re: Macro problems with delay

2010-09-10 Thread joshua-choi
I've solved the problem. I found that it only occurred when general- defmaker was called with its forms argument containing another general- defmaker call with def-form being defmacro. Thus, in the inner general- defmaker call, the *result* of (NamedRule. (delay …)) was embedded into a defmacro cal

Re: Macro problems with delay

2010-09-10 Thread joshua-choi
I've solved the problem. I found that it only occurred when general- defmaker was called with its forms argument containing another general- defmaker call with def-form being defmacro. Thus, in the inner general- defmaker call, the *result* of (NamedRule. (delay …)) was embedded into a defmacro cal

Re: Macro problems with delay

2010-09-10 Thread joshua-choi
You're right about the namespace-qualification: I accidentally macroexpanded with syntax-quote rather than quote. My mistake; the actual expansion is the same, but without namespace-qualification. Using (var ~fn-name) results in the same error, unfortunately. I think now the attempted embedding of

Re: Macro problems with delay

2010-09-10 Thread joshua-choi
That ought to be correct, but I can't reconcile that with the error message. Doesn't the "Can't embed object in code, maybe print-dup not defined" error only appear in macros, when some object being spliced into a macro's expansion is not a basic Clojure form? Yet, you are correct, commenting out t

Re: Macro problems with delay

2010-09-09 Thread Konrad Hinsen
On 10 Sep 2010, at 03:11, joshua-choi wrote: And here is a full macro-expansion of the call at which the error happens: http://gist.github.com/572879 If I understand the comment ("the following form is the culprit...") correctly, it's not the macroexpansion that fails, but the evaluation

Re: Macro problems with delay

2010-09-09 Thread Meikel Brandmeyer
Hi, On 10 Sep., 03:11, joshua-choi wrote: > I am running into a problem sometimes when I call a certain macro I > defined. This problem macro (and an associated problem function) is: > > http://gist.github.com/572875 > > I run into this error (which is at a call to the macro, but *not* at > the

Macro problems with delay

2010-09-09 Thread joshua-choi
I am running into a problem sometimes when I call a certain macro I defined. This problem macro (and an associated problem function) is: http://gist.github.com/572875 I run into this error (which is at a call to the macro, but *not* at the *first* time it's called for some reason!): http://gist.