[Ecls-list] ECL behavior of function-defining macro
Jeronimo Pellegrini
jpn at aleph0.info
Tue Oct 6 09:07:58 UTC 2009
Hi,
Some recent[0] git update in ECL has changed its behavior in the following
situation:
(defmacro def (name &key (declare '(optimize (speed 3) (safety 1))))
`(defun ,name ()
,(format nil "docstring here")
(declare ,declare)
10))
;; OK, the macro is defined
(macroexpand-1 '(def a))
==> (DEFUN A () "docstring here" (DECLARE (OPTIMIZE (SPEED 3) (SAFETY 1))) 10)
(def a)
==> A
(a)
The function SPEED is undefined.
Available restarts:
1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.
Broken at A. In: #<process SI:TOP-LEVEL 0000000000741f60>.
I don't know why exactly ECL is trying to eval "(SPEED 3)". Other Common Lisp
implementations don't seem to do that (SBCL, CLisp, ABCL, CCL).
So, I wonder if it's a bug in ECL or a bug in my code. :-)
Thank you,
J.
[0] Some weeks or months ago; I can't tell exactly when.
More information about the ecl-devel
mailing list