Re: Compiled COMPILE forms at load time Bug
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.cmucl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3/12/10 7:41 AM, Nikodemus Siivola wrote: > On 12 March 2010 14:01, Raymond Toy <[email protected]> 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" > Ok, so SBCL defines a new macro. I notice that ACL, Clisp and CCL define new functions. ACL and Clisp do it silently; CCL produces a cerror about redefining a macro as a function. Ray