[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-when bug
Date: 3 Jan 91 21:00:05 GMT
From: harrisr@turing.cs.rpi.edu (Richard Harris)
This bug appears in KCL and every version of AKCL, and is not really
related to EVAL-WHEN. It is caused by the way the KCL compiler
arranges to do the load-time package operations and interning of
symbols that are required by the file being compiled. At load-time,
the package operations that were at top level in the source file are
run, and all the file's symbols are interned, BEFORE anything else is
done. In your example, LOAD attempts to intern foobar in the package
abc, before running the (unless ...) form. The make-package is not
done first because it does not appear at top level.
This is a fairly difficult bug to fix.
You can work around the bug, though, by (1) splitting files, or (2)
using package operations at top level wherever possible. In you
example, you could (1) put the (unless ...) form in a separate file, or
(2) replace the (unless ...) form with (in-package 'abc)(in-package
'user).
Richard Harris
or maybe (3) replace 'abc::foobar with (intern "FOOBAR" :abc).
Stephen
--
Stephen L Nicoud <snicoud@atc.boeing.com> uw-beaver!bcsaic!snicoud
Boeing Advanced Technology Center for Computer Sciences
Bellevue, Washington USA