Add explicit-check to defknown, sleep already explicitly checks the
argument.
Slightly improve the produced error message.
(when (or (not (realp seconds))
(minusp seconds))
(error 'simple-type-error
- :format-control "invalid argument to SLEEP: ~S"
+ :format-control "Invalid argument to SLEEP: -1, ~
+ should be a non-negative real."
:format-arguments (list seconds)
:datum seconds
:expected-type '(real 0)))
(defknown (get-internal-run-time get-internal-real-time)
() internal-time (flushable))
-(defknown sleep ((or (rational 0) (float 0.0))) null)
+(defknown sleep ((real 0)) null (explicit-check))
;;; Even though ANSI defines LISP-IMPLEMENTATION-TYPE and
;;; LISP-IMPLEMENTATION-VERSION to possibly punt and return NIL, we