Changeset 7234
- Timestamp:
- Sep 17, 2007, 7:40:29 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0709/ccl/level-1/sysutils.lisp
r2326 r7234 310 310 (%kernel-restart $xwrongtype arg type))) 311 311 312 ; Might want to use an inverted mapping instead of (satisfies ccl::obscurely-named)312 ;;; Might want to use an inverted mapping instead of (satisfies ccl::obscurely-named) 313 313 (defun %require-type (arg predsym) 314 314 (if (funcall predsym arg) 315 315 arg 316 (%kernel-restart $xwrongtype arg `(satisfies ,predsym))))316 (%kernel-restart $xwrongtype arg (type-for-predicate predsym)))) 317 317 318 318 (defun %require-type-builtin (arg type-cell) … … 323 323 324 324 325 ;;; In lieu of an inverted mapping, at least try to find cases involving 326 ;;; builtin numeric types and predicates associated with them. 327 (defun type-for-predicate (pred) 328 (or (block find 329 (maphash #'(lambda (type ctype) (when (and (typep ctype 'numeric-ctype) 330 (eq (numeric-ctype-predicate ctype) 331 pred)) 332 (return-from find type))) 333 *builtin-type-info*)) 334 `(satisfies ,pred))) 325 335 326 336
Note: See TracChangeset
for help on using the changeset viewer.