[comp.lang.lisp] VAX LISP

Duchier-Denys@cs.yale.edu (Denys Duchier) (10/12/88)

	I am trying to help someone port my theorem proving environment to VAX
LISP. The stuff is written in common-lisp and should presumably run "as is" in
VAX LISP (V2.2). However, I have run into the following 2 bugs:

1. The reading of CLtL is ambiguous, but typically (DEFVAR var) proclaims `var'
special and leaves it unbound. In VAX LISP, it sets `var' to NIL. This is easily
changed by redefining the DEFVAR macro. (btw, what IS the correct reading?)

2. I ran into what looks like a compiler bug. Put the following code in a file,
compile the file, then load it:

(in-package 'user)

(eval-when (compile eval load)
    (setf (symbol-function 'map-car)
          (symbol-function 'mapcar))
    (defmacro mapkar (&rest l) `(map-car ,@l)))

(defun try (e)
  (labels
      ((fn (l) (fn l)))
    (mapkar #'(lambda (x) x) e)))

Now type (try '(1 2 3)) and you get a run time error that seems to be so nasty
that it even bombs out of the debugger and resets to the REPLoop.

The labels is necessary. The function defined in the labels has to be recursive
(however the content of the body matters not. the one above was chosen for
simplicity). Using said function or not makes no difference. As the first
argument to mapkar you need #'(lambda ...), something simpler like #'identity
doesn't cause the problem. It is not a problem with eval-when (eval-when just
ensures that the stuff is there at compile and eval time, but you can do that
another way).

Anybody knows what is going on? Is there a fix, or am I out of luck?

--Denys