[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug (?) in akcl 1.603, eval-when and defvar are misbehaving (?)
I have the following quite trivial file (narrowed from a bigger one with a
problem, there are reasons for doing things this way):
================================================== foo.lsp
(in-package :user)
(eval-when (compile load eval)
(defvar *exports* '(operate-on-system oos)))
(eval-when (compile load eval)
(export *exports*))
==================================================
that compiles fine under akcl 1.603. If I do (compile-file "foo") (load
"foo"), I get a warning about the export being in the wrong place, but other
than that everything is fine, it loads.
HOWEVER, if I restart a new akcl image and just try (load "foo.o"), I get:
Error: The variable *EXPORTS* is unbound.
This program works fine in: Harlequin, Lucid, Franz Allegro, CMU, VAXLisp
(I'm trying to make my system portable for release, I'm not currently an
active akcl user, though I used to be). This code is from Mark Kantrowitz's
wonderful public-domain defsystem, which works on all the above
implementations, but not on akcl because of this problem :).
Oh, one other thing, if I leave out the (eval-when) and put these forms at
the top-level, I get another problem -- defvar does not seem to have the
desired effect, so akcl can't even compile the export form.
Any clues anyone? Sorry, I've narrowed it as much as possible, it looks like
legal Common Lisp (Steele I or II) to me, I don't know what else to put in a
bug report.
Cheers -- Kevin Thompson
kthompso@ptolemy.arc.nasa.gov Artificial Intelligence Research Laboratory
(415) 604-4767 (voicemail) NASA-Ames Research Center, Moffett Field, CA