[cmucl-imp] Re: Compiled COMPILE forms at load time Bug
Nikodemus Siivola
nikodemus at random-state.net
Fri Mar 12 13:41:29 CET 2010
On 12 March 2010 14:01, Raymond Toy <toy.raymond at gmail.com> wrote:
> On 3/10/10 1:47 PM, Helmut Eller wrote:
>> One more thing:
>>
>> (defmacro bar () 1)
>> (compile 'bar '(lambda () 2))
>>
>> should remove the macro binding for bar.
>>
>
> Hmm. The CLHS entry for COMPILE says:
>
> if name is a symbol that names a macro, its macro function is updated
>
> What is that supposed to mean? The macro binding should be removed?
> That we're defining a new macro expansion for that symbol?
I believe it means this (which is the SBCL take on the subject):
CL-USER> (defmacro foo () "old FOO")
FOO
CL-USER> (foo)
"old FOO"
CL-USER> (compile 'foo `(lambda (form env)
(declare (ignore form env))
"new FOO"))
FOO
NIL
NIL
CL-USER> (foo)
"new FOO"
Cheers,
-- Nikodemus
More information about the cmucl-imp
mailing list