More bug fixes

This commit is contained in:
2026-09-08 11:27:11 -07:00
parent 0c6956c9c9
commit d472a02abc
2 changed files with 15 additions and 12 deletions
+5 -5
View File
@@ -177,7 +177,7 @@ Spec is of the form (VARIABLE LIST &optional RETURN-FORM)."
(pred (get name 'type-predicate))
(args (and (consp type) (cdr type))))
(unless pred
(throw 'type-error))
(throw 'type-error (list obj 'type)))
(apply pred obj args)))
(define-type-predicate t (obj) t)
@@ -201,7 +201,7 @@ Spec is of the form (VARIABLE LIST &optional RETURN-FORM)."
(define-type-predicate symbol symbolp)
(define-type-predicate cons consp)
(define-type-predicate list listp)
(define-type-predicate integer (obj &opt min max)
(define-type-predicate integer (obj &optional min max)
(and (integerp obj)
(or (not min) (>= obj min))
(or (not max) (<= obj max))))
@@ -210,7 +210,7 @@ Spec is of the form (VARIABLE LIST &optional RETURN-FORM)."
(define-type-predicate byte alias (integer -128 127))
(define-type-predicate signed-byte alias byte)
(define-type-predicate unsigned-byte alias (integer 0 255))
(define-type-predicate float (obj &opt min max)
(define-type-predicate float (obj &optional min max)
(and (floatp obj)
(or (not min) (>= obj min))
(or (not max) (<= obj max))))
@@ -220,8 +220,8 @@ Spec is of the form (VARIABLE LIST &optional RETURN-FORM)."
(define-type-predicate hash-table hash-table-p)
(define-type-predicate user-pointer user-pointer-p)
(define-type-predicate record recordp)
(define-type-predicate number (obj &opt min max)
(define-type-predicate number (obj &optional min max)
(typep obj (list 'or (list 'float min max)
(list 'integer min max))))
(princln (typep [] '(or vector list)))
(princln (typep 21 'number))