I'm not sure if this is a Lisp thing or an issue specific to CMUCL,
but when I compile this macro and try to include the resulting x86f
file into a larger binary (i.e. using 'cat'), I see this: "Error in
batch processing: Cannot dump objects of type FUNCTION into fasl
files."
This is the macro:
(defmacro update-list-hash (hash data-key data-value &optional
(test-fn #'string-equal))
"Update the given hash (key:value is 1:n) with data by adding data
to the list of values for the key."
`(let ((current (gethash ,data-key ,hash)))
(if (member ,data-value current :test ,test-fn)
current
(setf (gethash ,data-key ,hash) (cons ,data-value current)))))
If I remove the optional parameter and explicitly specify the member
:test parameter inside the macro, I can compile and cat the resulting
x86f file without any problems.
Any idea why this might be happening and what (if any) work-arounds there are?
I'm using CMUCL 19e on debian etch.