(defmacro define-cached-synonym
(name &optional (original (symbolicate "%" name)))
- (let ((cached-name (symbolicate "%%" name "-cached")))
+ (let ((cached-name (symbolicate "%%" name "-CACHED")))
`(progn
(defun-cached (,cached-name :hash-bits 8
:hash-function (lambda (x)
(%failed-enforce-type ,value ',type))))
(defun %failed-enforce-type (value type)
- (error 'simple-type-error ; maybe should be TYPE-BUG, subclass of BUG?
- :value value
+ ;; maybe should be TYPE-BUG, subclass of BUG? If it is changed,
+ ;; check uses of it in user-facing code (e.g. WARN)
+ (error 'simple-type-error
+ :datum value
:expected-type type
:format-control "~@<~S ~_is not a ~_~S~:>"
:format-arguments (list value type)))