31 lines
991 B
Scheme
31 lines
991 B
Scheme
|
;;;; type-errors-numbers.number.scm -*- Scheme -*-
|
||
|
;;;; Kon Lovett, Jul '18
|
||
|
|
||
|
(module type-errors-numbers.number
|
||
|
|
||
|
(;export
|
||
|
error-number error-positive-number error-non-negative-number
|
||
|
error-natural-number error-negative-number error-non-positive-number)
|
||
|
|
||
|
(import scheme)
|
||
|
(import (chicken base))
|
||
|
(import (chicken module))
|
||
|
(import (chicken type))
|
||
|
(import type-errors-basic)
|
||
|
|
||
|
(: error-number (* * #!optional * -> noreturn))
|
||
|
(: error-positive-number (* * #!optional * -> noreturn))
|
||
|
(: error-non-negative-number (* * #!optional * -> noreturn))
|
||
|
(: error-natural-number (* * #!optional * -> noreturn))
|
||
|
(: error-negative-number (* * #!optional * -> noreturn))
|
||
|
(: error-non-positive-number (* * #!optional * -> noreturn))
|
||
|
|
||
|
(define-error-type number)
|
||
|
(define-error-type positive-number)
|
||
|
(define-error-type non-negative-number)
|
||
|
(define error-natural-number error-non-negative-number)
|
||
|
(define-error-type negative-number)
|
||
|
(define-error-type non-positive-number)
|
||
|
|
||
|
) ;module type-errors-numbers.number
|