;;;; type-errors-basic.scm -*- Scheme -*- ;;;; Kon Lovett, Jul '18 (declare (bound-to-procedure ##sys#signal-hook ##sys#error-hook) ) (module type-errors-basic (;export ; (define-error-type error-argument-type) ; make-location-message make-bad-argument-message make-type-name-message make-tagged-kind-message ; make-error-type-message make-error-interval-message make-warning-type-message ; signal-bounds-error signal-type-error ; error-argument-type warning-argument-type ; error-bound-value error-defined-value ; error-minimum-argument-count error-argument-count) (import scheme) (import (chicken base)) (import (chicken type)) (import (only (chicken string) ->string)) (import (chicken foreign)) ;message api (: make-location-message (* --> string)) (: make-bad-argument-message (#!optional * --> string)) (: make-type-name-message (* --> string)) (: make-tagged-kind-message (* * --> string)) (: make-error-type-message (* #!optional * --> string)) (: make-error-interval-message (* * * * #!optional * --> string)) (: make-warning-type-message (* * * #!optional * --> string)) ;warn api (: warning-argument-type (* * * #!optional * -> noreturn)) ;abort api (: signal-bounds-error (* #!rest -> noreturn)) (: signal-type-error (* #!rest -> noreturn)) (: error-argument-type (* * * #!optional * -> noreturn)) (: error-bound-value (* * #!optional * -> noreturn)) (: error-defined-value (* * #!optional * -> noreturn)) (: error-minimum-argument-count (* fixnum fixnum -> noreturn)) (: error-argument-count (* fixnum fixnum -> noreturn)) ;; (define (->boolean x) (and x #t)) ;;; (include "type-errors-basic.impl") ) ;module type-errors-basic