[Ecls-list] backquote bug?

Raymond Toy toy.raymond at gmail.com
Tue Mar 4 01:53:44 UTC 2008


I thought I would try to build maxima with ecl, but ran into a problem.

Maxima defines this function:

(defun make-operation (.type .op .return)
  (or .return (setf .return .type))
  #'(lambda (bod env)
      (declare (ignore env))
      (loop for v in (cdr bod)
     when (eq t .type) collect v into body
     else
     collect `(the , .type ,v) into body
     finally (setq body `(, .op , at body))
     (return
       (if (eq t .return)
           body
           `(the , .return ,body))))))

And then uses it like so:

(setf (macro-function 'zot) (make-operation 'fixnum '+ nil))

ECL accepts this ok.  But then

(macroexpand-1 '(zot a b))

produces an error about TYPE being unbound.

This code works fine for the other lisps that maxima can be built with: 
 gcl, clisp, cmucl, sbcl, scl, openmcl, and others.

Is this a bug in ecl?

Ray





More information about the ecl-devel mailing list