This one a long time to figure out.
I was getting errors like this:
; caught ERROR:
; during macroexpansion of (LOOP FOR (Y Z) ...). Use *BREAK-ON-SIGNALS* to
; intercept.
;
; The value
; NIL
; is not of type
; (MEMBER T)
I don't understand why the error is caught. This seems to only make
debugging more inconvenient. But that's a side issue.
It turns out that this (member t) came from the following definition:
;; bootstrap (redefine later)
(defun need-read-lock-desc(desc) t)
The macroexpansion mentioned in the error message was calling a
function that called need-read-lock-desc, and that function ended up
checking that the result of its call to need-read-lock-desc was of
type (member t), And that didn't work after the later redefinition.
BTW, this type check did not appear when I loaded the source file,
only when I loaded the result of compile-file. And it did not appear
when the definition (of the caller) was copied to a subsequent file,
even when that file was compiled, so I guess it's the fact that the
two functions appeared in the same file being compiled that caused the
compiler to do this.
Is this even allowed by the spec? It certainly violates my
expectations. Whenever I redefine a function do I have to recompile
all of its callers? What am I supposed to do in order to use a
temporary bootstrap definition?
_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help