chickadee » check-errors » define-check+error-type

(define-check+error-type TYPNAM [TYPE-PRED [TYPSIG]])syntax
(define-check+error-type/type TYPNAM [TYPE-PRED [TYPSIG]])syntax

Creates a procedure definition for check-TYPNAM with the signature of the above check procedures. The type-predicate is either TYPE-PRED, when present, or TYPE?. The error message type-name is either the TYPSIG, when present, or TYPNAM. The define-check+error-type/type variant adds a procedure type signature.

TYPNAM
symbol
TYPE-PRED
procedure
TYPSIG
(or symbol (list-of TYPSIG))
(define-check+error-type hash-table)
;=>
;(begin
;  (define-error-type hash-table)
;  (define (check-hash-table loc obj #!optional argnam)
;    (unless (hash-table? obj)
;      (error-hash-table loc obj argnam))
;    obj))