(with THE, so dependent on compiler policy) to involve objects of
type FOO. Note that no such declaration is implied in
(MAKE-ARRAY .. :ELEMENT-TYPE 'FOO).
+ * declared types of functions from the "Conditions"
+ chapter. (reported by Paul Dietz)
+ * bug fix: CERROR accepts a function as its first argument.
planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
"FIND-AND-INIT-OR-CHECK-LAYOUT"
"FLOAT-EXPONENT" "FLOAT-FORMAT-DIGITS" "FLOAT-FORMAT-NAME"
"FLOAT-FORMAT-MAX" "FLOATING-POINT-EXCEPTION"
- "FORM" "*FREE-INTERRUPT-CONTEXT-INDEX*" "FUNCALLABLE-INSTANCE-P"
+ "FORM"
+ "FORMAT-CONTROL"
+ "*FREE-INTERRUPT-CONTEXT-INDEX*" "FUNCALLABLE-INSTANCE-P"
"FUN-CODE-HEADER"
"FUN-TYPE" "FUN-TYPE-ALLOWP"
"FUN-TYPE-KEYP" "FUN-TYPE-KEYWORDS"
#!+x86 "*PSEUDO-ATOMIC-INTERRUPTED*"
"PUNT-PRINT-IF-TOO-LONG"
"READER-IMPOSSIBLE-NUMBER-ERROR" "READER-PACKAGE-ERROR"
+ "RESTART-DESIGNATOR"
"SCALE-DOUBLE-FLOAT"
#!+long-float "SCALE-LONG-FLOAT"
"SCALE-SINGLE-FLOAT"
;;; semistandard types
(sb!xc:deftype generalized-boolean () t)
+(sb!xc:deftype format-control ()
+ '(or string function))
+
+(sb!xc:deftype restart-designator ()
+ '(or (and symbol (not null)) restart))
+
;;; a type specifier
;;;
;;; FIXME: The SB!KERNEL:INSTANCE here really means CL:CLASS.
(define-condition simple-stream-error (simple-condition stream-error) ())
(define-condition simple-parse-error (simple-condition parse-error) ())
-;;; This condition is signalled whenever we make a UNKNOWN-TYPE so that
-;;; compiler warnings can be emitted as appropriate.
-(define-condition parse-unknown-type (condition)
- ((specifier :reader parse-unknown-type-specifier :initarg :specifier)))
-
(define-condition control-stack-exhausted (storage-condition)
()
(:report
;;; There are all sorts of nasty problems with open bounds on FLOAT
;;; types (and probably FLOAT types in general.)
+;;; This condition is signalled whenever we make a UNKNOWN-TYPE so that
+;;; compiler warnings can be emitted as appropriate.
+(define-condition parse-unknown-type (condition)
+ ((specifier :reader parse-unknown-type-specifier :initarg :specifier)))
+
;;; FIXME: This really should go away. Alas, it doesn't seem to be so
;;; simple to make it go away.. (See bug 123 in BUGS file.)
(defvar *use-implementation-types* t ; actually initialized in cold init
(defknown directory (pathname-designator &key)
list ())
\f
-;;;; from the "Errors" chapter:
-
-(defknown error (t &rest t) nil) ; never returns
-(defknown cerror (string t &rest t) null)
+;;;; from the "Conditions" chapter:
+
+(defknown cell-error-name (cell-error) t)
+(defknown error (t &rest t) nil)
+(defknown cerror (format-control t &rest t) null)
+(defknown invalid-method-error (t format-control &rest t) *) ; FIXME: first arg is METHOD
+(defknown method-combination-error (format-control &rest t) *)
+(defknown signal (t &rest t) null)
+(defknown simple-condition-format-control (condition)
+ format-control)
+(defknown simple-condition-format-arguments (condition)
+ list)
(defknown warn (t &rest t) null)
-(defknown break (&optional t &rest t) null)
+(defknown invoke-debugger (condition) nil)
+(defknown break (&optional format-control &rest t) null)
+(defknown make-condition (type-specifier &rest t) condition)
+(defknown compute-restarts (&optional (or condition null)) list)
+(defknown find-restart (restart-designator &optional (or condition null))
+ (or restart null))
+(defknown invoke-restart (restart-designator &rest t) *)
+(defknown invoke-restart-interactively (restart-designator) *)
+(defknown restart-name (restart) symbol)
+(defknown (abort muffle-warning) (&optional (or condition null)) nil)
+(defknown continue (&optional (or condition null)) null)
+(defknown (store-value use-value) (t &optional (or condition null))
+ null)
;;; and analogous SBCL extension:
(defknown bug (t &rest t) nil) ; never returns
(foo () :test (lambda (c) (declare (ignore c)) visible)
'in2))
(foo () 'ext)))))))
+
+;;; First argument of CERROR is a format control
+(assert
+ (eq (block nil
+ (handler-bind
+ ((type-error (lambda (c) (return :failed)))
+ (simple-error (lambda (c)
+ (return (if (find-restart 'continue)
+ :passed
+ :failed)))))
+ (cerror (formatter "Continue from ~A") "bug ~A" :bug)))
+ :passed))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.1.9"
+"0.8.1.10"