- (let ((canon `(:name ',name :readers ',readers :writers ',writers
- :initargs ',initargs ',others)))
+ (let* ((type-check-function
+ (if (eq type t)
+ nil
+ `('type-check-function (lambda (value)
+ (declare (type ,type value))
+ value))))
+ (canon `(:name ',name :readers ',readers :writers ',writers
+ :initargs ',initargs
+ ,@type-check-function
+ ',others)))