On Mon, Dec 09, 2002 at 12:35:17PM -0600, [EMAIL PROTECTED] wrote:
> I've been getting some cryptic error messages from the following block
> of code with CMUCL 18d
>
> (in-package "COMMON-LISP-USER")
>
> (defmacro setassoc (key new-element alist &key (test #'eq))
^^^^^^^^^^^
Here's your problem -- using this you'll try to dump the literal
function object to file, rather than a reference to a function. You
want (test '#'eq) there instead.
> In: DEFUN BLETCH
> (SETASSOC JOB TIME FIRST-CALLS)
> --> LET* IF SETF SETQ DELETE
> ==>
> #<Function EQ {1000A3F9}>
> Error: Cannot dump objects of type (FUNCTION (T T) (MEMBER T NIL)) into fasl files.
This has expanded via ,test into something involving the literal
function EQ, not the form (FUNCTION EQ).
> Interestingly, the SETASSOC macro is fine when I enter it in a REPL,
> but doesn't compile. I'm afraid I don't have a clue why the compiler
> seems to hate #'eq so much.
It's not the compiler so much as the dumper that has a problem with
it... anyway, with the extra quote you should be alright.
Cheers,
Christophe
--
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)