Ignore:
Timestamp:
Apr 2, 2008, 8:13:55 AM (12 years ago)
Author:
gb
Message:

Define %CHECK-TYPE, which just sets up the STORE-VALUE restart for
CHECK-TYPE. (CHECK-TYPE will expand into a call to this if an
initial TYPEP fails; that can cause lots of warnings during
REBUILD-CCL et al. Ignore them.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-error-system.lisp

    r8855 r8988  
    987987
    988988
     989(defun %check-type (value typespec placename typename)
     990  (let ((condition (make-condition 'type-error
     991                                   :datum value
     992                                   :expected-type typespec)))
     993    (if typename
     994      (setf (slot-value condition 'format-control)
     995            (format nil "value ~~S is not ~A (~~S)." typename)))
     996    (restart-case (%error condition nil (%get-frame-ptr))
     997                  (store-value (newval)
     998                               :report (lambda (s)
     999                                         (format s "Assign a new value of type ~a to ~s" typespec placename))
     1000                               :interactive (lambda ()
     1001                                              (format *query-io* "~&New value for ~S :" placename)
     1002                                              (list (eval (read))))
     1003                               newval))))
    9891004
    9901005
Note: See TracChangeset for help on using the changeset viewer.