check-errors
Argument checks & errors.
TOC »
- check-errors
- Documentation
- Usage
- Check Error Basic
- Argument Conventions
- Type Checks
- Usage
- Type Checks Basic
- Type Checks Numbers
- Usage
- check-real
- check-complex
- check-rational
- check-exact
- check-inexact
- check-number
- check-positive-number
- check-non-negative-number
- check-natural-number
- check-negative-number
- check-non-positive-number
- check-integer
- check-positive-integer
- check-non-negative-integer
- check-natural-integer
- check-negative-integer
- check-non-positive-integer
- check-fixnum
- check-positive-fixnum
- check-non-negative-fixnum
- check-natural-fixnum
- check-negative-fixnum
- check-non-positive-fixnum
- check-bignum
- check-positive-bignum
- check-non-negative-bignum
- check-negative-bignum
- check-non-positive-bignum
- check-ratnum
- check-positive-ratnum
- check-non-positive-bignum
- check-negative-ratnum
- check-non-positive-ratnum
- check-flonum
- check-float
- check-positive-flonum
- check-non-positive-flonum
- check-negative-flonum
- check-non-positive-flonum
- check-cplxnum
- Type Checks Numbers Interval
- Type Checks Structured
- Type Checks Atoms
- Type Errors
- Argument Conventions
- Usage
- Type Errors Basic
- Usage
- make-bad-argument-message
- make-type-name-message
- make-error-type-message
- make-location-message
- make-warning-type-message
- make-error-interval-message
- signal-bounds-error
- signal-type-error
- error-argument-type
- warning-argument-type
- error-defined-value
- error-bound-value
- error-minimum-argument-count
- error-argument-count
- define-error-type
- Type Errors Numbers
- Usage
- error-real
- error-complex
- error-rational
- error-exact
- error-inexact
- error-number
- error-positive-number
- error-non-positive-number
- error-natural-number
- error-negative-number
- error-non-positive-number
- error-integer
- error-positive-integer
- error-non-positive-integer
- error-natural-integer
- error-negative-integer
- error-non-positive-integer
- error-fixnum
- error-positive-fixnum
- error-non-positive-fixnum
- error-natural-fixnum
- error-negative-fixnum
- error-non-positive-fixnum
- error-bignum
- error-positive-bignum
- error-non-positive-bignum
- error-negative-bignum
- error-non-positive-bignum
- error-ratnum
- error-positive-ratnum
- error-non-positive-ratnum
- error-negative-ratnum
- error-non-positive-ratnum
- error-float
- error-flonum
- error-positive-flonum
- error-non-positive-flonum
- error-negative-flonum
- error-non-positive-flonum
- error-cplxnum
- Type Errors Numbers Interval
- Type Errors Structured
- Type Errors Atoms
- SRFI 4 Checks
- SRFI 4 Errors
- Type Checks System
- Usage
- check-list
- check-pair
- check-vector
- check-boolean
- check-char
- check-exact
- check-inexact
- check-number
- check-integer
- check-real
- check-fixnum
- check-string
- check-symbol
- check-keyword
- check-output-port
- check-input-port
- check-locative
- check-closure
- check-procedure
- check-byte-vector
- check-blob
- check-structure
- check-exact-integer
- check-exact-unsigned-integer
- check-fixnum-in-range
- Notes
- Bugs & Limitations
- Author
- Repository
- Version history
- License
Documentation
Usage
(import check-errors)
Everything.
Check Error Basic
The type-checks-basic & type-errors-basic module reexports.
Usage
(import (check-errors basic))
The minimum.
Argument Conventions
LOC is a symbol, or #f. The symbolic naming of the location detecting the problem. As in the error form.
OBJ is any Scheme object.
ARGNAM is an, optional, or string symbol keyword naming the argument list element corresponding to the OBJ. The default is the type-name.
Type Checks
Performs the minimal constraint check and raises an error condition upon failure. The mimimal constraint proviso is important for understanding the behavior of the checking routines. Unless otherwise specified no additional constraints are verified.
So the check-...-interval routines, for example, do not verify the types of the arguments, only the interval constraint.
When the unsafe feature is defined the check procedures are no-ops.
All check-... routines return the checked object.
Usage
(import type-checks)
Type Checks Basic
Usage
(import type-checks-basic)
check-defined-value
- check-defined-value LOC OBJ #!optional ARGNAMprocedure
Ensures the OBJ is non-void, i.e. not an undefined-value.
check-bound-value
- check-bound-value LOC OBJ #!optional ARGNAMprocedure
Ensures the OBJ is the value of a bound variable.
Only for use in rather unsafe calling environments where some explicit checking is necessary.
check-minimum-argument-count
- check-minimum-argument-count LOC ARGC MINARGCprocedure
Does not verify the type of ARGC, and MINARGC.
check-argument-count
- check-argument-count LOC ARGC MAXARGCprocedure
Does not verify the type of ARGC, and MAXARGC.
define-check-type
- (define-check-type TYPNAM [TYPE-PRED])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 TYPNAM?.
TYPNAM is an unquoted symbol.
(define-check-type hash-table) ;=> ;(define (check-hash-table loc obj #!optional argnam) ; (unless (hash-table? obj) ; (error-hash-table loc obj argnam)) ; obj )
define-check+error-type
- (define-check+error-type TYPNAM [TYPE-PRED [TYPMSG]])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 TYPMSG, when present, or "TYPNAM".
TYPNAM is an unquoted symbol.
(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))
Type Checks Numbers
Omnibus module vovering the individual type-checks-numbers modules below.
Usage
(import type-checks-numbers)
check-real
check-complex
check-rational
check-exact
check-inexact
(import (type-checks-numbers scheme))
- check-real LOC OBJ #!optional ARGNAMprocedure
- check-complex LOC OBJ #!optional ARGNAMprocedure
- check-rational LOC OBJ #!optional ARGNAMprocedure
- check-exact LOC OBJ #!optional ARGNAMprocedure
- check-inexact LOC OBJ #!optional ARGNAMprocedure
check-number
check-positive-number
check-non-negative-number
check-natural-number
check-negative-number
check-non-positive-number
(import (type-checks-numbers number))
- check-number LOC OBJ #!optional ARGNAMprocedure
- check-positive-number LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-number LOC OBJ #!optional ARGNAMprocedure
- check-natural-number LOC OBJ #!optional ARGNAMprocedure
- check-negative-number LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-number LOC OBJ #!optional ARGNAMprocedure
check-integer
check-positive-integer
check-non-negative-integer
check-natural-integer
check-negative-integer
check-non-positive-integer
(import (type-checks-numbers integer))
- check-integer LOC OBJ #!optional ARGNAMprocedure
- check-positive-integer LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-integer LOC OBJ #!optional ARGNAMprocedure
- check-natural-integer LOC OBJ #!optional ARGNAMprocedure
- check-negative-integer LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-integer LOC OBJ #!optional ARGNAMprocedure
check-fixnum
check-positive-fixnum
check-non-negative-fixnum
check-natural-fixnum
check-negative-fixnum
check-non-positive-fixnum
(import (type-checks-numbers fixnum))
- check-fixnum LOC OBJ #!optional ARGNAMprocedure
- check-positive-fixnum LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-fixnum LOC OBJ #!optional ARGNAMprocedure
- check-natural-fixnum LOC OBJ #!optional ARGNAMprocedure
- check-negative-fixnum LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-fixnum LOC OBJ #!optional ARGNAMprocedure
check-bignum
check-positive-bignum
check-non-negative-bignum
check-negative-bignum
check-non-positive-bignum
(import (type-checks-numbers bignum))
- check-bignum LOC OBJ #!optional ARGNAMprocedure
- check-positive-bignum LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-bignum LOC OBJ #!optional ARGNAMprocedure
- check-negative-bignum LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-bignum LOC OBJ #!optional ARGNAMprocedure
check-ratnum
check-positive-ratnum
check-non-positive-bignum
check-negative-ratnum
check-non-positive-ratnum
(import (type-checks-numbers ratnum))
- check-ratnum LOC OBJ #!optional ARGNAMprocedure
- check-positive-ratnum LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-ratnum LOC OBJ #!optional ARGNAMprocedure
- check-negative-ratnum LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-ratnum LOC OBJ #!optional ARGNAMprocedure
check-flonum
check-float
check-positive-flonum
check-non-positive-flonum
check-negative-flonum
check-non-positive-flonum
(import (type-checks-numbers flonum))
- check-flonum LOC OBJ #!optional ARGNAMprocedure
- check-float LOC OBJ #!optional ARGNAMprocedure
- check-positive-flonum LOC OBJ #!optional ARGNAMprocedure
- check-non-negative-flonum LOC OBJ #!optional ARGNAMprocedure
- check-negative-flonum LOC OBJ #!optional ARGNAMprocedure
- check-non-positive-flonum LOC OBJ #!optional ARGNAMprocedure
check-cplxnum
(import (type-checks-numbers cplxnum))
Type Checks Numbers Interval
Usage
(import (type-checks-numbers interval))
check-range
- check-range LOC START END #!optional ARGNAMprocedure
Verify (<= START END) & return (values START END).
Does not verify the type of START and END.
check-open-interval
- check-open-interval LOC NUM MINNUM MAXNUM #!optional ARGNAMprocedure
NUM in ]MINNUM MAXNUM[.
Does not verify the type of NUM, MINNUM, and MAXNUM.
check-closed-interval
- check-closed-interval LOC NUM MINNUM MAXNUM #!optional ARGNAMprocedure
NUM in [MINNUM MAXNUM].
Does not verify the type of NUM, MINNUM, and MAXNUM.
check-half-open-interval
- check-half-open-interval LOC NUM MINNUM MAXNUM #!optional ARGNAMprocedure
NUM in ]MINNUM MAXNUM].
Does not verify the type of NUM, MINNUM, and MAXNUM.
check-half-closed-interval
- check-half-closed-interval LOC NUM MINNUM MAXNUM #!optional ARGNAMprocedure
NUM in [MINNUM MAXNUM[.
Does not verify the type of NUM, MINNUM, and MAXNUM.
Type Checks Structured
Usage
(import type-checks-structured)
check-procedure
check-input-port
check-output-port
check-list
- check-list LOC OBJ #!optional ARGNAMprocedure
check-alist
check-plist
check-pair
- check-pair LOC OBJ #!optional ARGNAMprocedure
check-blob
- check-blob LOC OBJ #!optional ARGNAMprocedure
check-vector
check-structure
- check-structure LOC OBJ TAG #!optional ARGNAMprocedure
- check-record LOC OBJ TAG #!optional ARGNAMprocedure
- check-record-type LOC OBJ TAG #!optional ARGNAMprocedure
Essentially synonyms.
define-check-structure
- (define-check-structure TAG)syntax
Creates a procedure definition for check-TAG with the signature of the above check procedures, and the body of (check-structure LOC OBJ TAG [ARGNAM]).
check-string
Type Checks Atoms
Usage
(import type-checks-atoms)
check-symbol
check-keyword
check-char
- check-char LOC OBJ #!optional ARGNAMprocedure
check-boolean
Type Errors
Argument Conventions
TYPNAM is a symbol or string, unless otherwise indicated.
ARGNAM is a symbol, string, or #f. Default is #f.
Usage
(import type-errors)
Type Errors Basic
Usage
(import type-errors-basic)
make-bad-argument-message
- make-bad-argument-message #!optional ARGNAMprocedure
Returns an argument type error message for the, optional, ARGNAM.
Example:
(make-bad-argument-message "count") ;=> "bad `count' argument" (make-bad-argument-message) ;=> "bad argument"
make-type-name-message
- make-type-name-message TYPNAMprocedure
Returns an argument type message for the TYPNAM by supplying an article.
Example:
(make-type-name-message integer) ;=> an integer" (make-type-name-message "symbol in {foo bar baz}") ;=> "a symbol in {foo bar baz}"
make-error-type-message
- make-error-type-message TYPNAM #!optional ARGNAMprocedure
Returns a type error message from the TYPNAM and optional ARGNAM.
Uses make-bad-argument-message and make-type-name-message to build the message components.
Example:
(make-error-type-message 'integer "count") ;=> "bad `count' argument type - not an integer"
make-location-message
- make-location-message LOCprocedure
make-warning-type-message
make-error-interval-message
signal-bounds-error
- signal-bounds-error LOC MSG OBJ...procedure
Raises a non-continuable type error - (({exn bounds)}}.
signal-type-error
- signal-type-error LOC MSG OBJ...procedure
Raises a non-continuable type error - (({exn type)}}.
error-argument-type
- error-argument-type LOC OBJ TYPNAM #!optional ARGNAMprocedure
Raises a type-error where is message is constructed from the TYPNAM and ARGNAM.
Uses signal-type-error and make-error-type-message.
warning-argument-type
- warning-argument-type LOC OBJ TYPNAM #!optional ARGNAMprocedure
A warning is issued with a message similar to that of error-argument-type.
error-defined-value
error-bound-value
error-minimum-argument-count
error-argument-count
define-error-type
- (define-error-type TYPNAM [TYPMSG])syntax
TYPNAM is a symbol.
TYPMSG is a symbol or string.
Creates a procedure definition for error-TYPNAM with the signature of the above error procedures. The type-name is either TYPMSG, when present, or "TYPNAM".
(define-error-type hash-table) ;=> ;(define (error-hash-table loc obj #!optional argnam) ; (error-argument-type loc obj 'hash-table argnam) ) (define-error-type byte-order "symbol in {big-endian little-endian}") ;=> ;(define (error-byte-order loc obj #!optional argnam) ; (error-argument-type loc obj "symbol in {big-endian little-endian}" argnam) )
Type Errors Numbers
Omnibus module vovering the individual type-errors-numbers modules below.
Usage
(import type-errors-numbers)
error-real
error-complex
error-rational
error-exact
error-inexact
(import (type-errors-numbers scheme))
- error-real LOC OBJ #!optional ARGNAMprocedure
- error-complex LOC OBJ #!optional ARGNAMprocedure
- error-rational LOC OBJ #!optional ARGNAMprocedure
- error-exact LOC OBJ #!optional ARGNAMprocedure
- error-inexact LOC OBJ #!optional ARGNAMprocedure
error-number
error-positive-number
error-non-positive-number
error-natural-number
error-negative-number
error-non-positive-number
(import (type-errors-numbers number))
- error-number LOC OBJ #!optional ARGNAMprocedure
- error-positive-number LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-number LOC OBJ #!optional ARGNAMprocedure
- error-natural-number LOC OBJ #!optional ARGNAMprocedure
- error-negative-number LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-number LOC OBJ #!optional ARGNAMprocedure
error-integer
error-positive-integer
error-non-positive-integer
error-natural-integer
error-negative-integer
error-non-positive-integer
(import (type-errors-numbers integer))
- error-integer LOC OBJ #!optional ARGNAMprocedure
- error-positive-integer LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-integer LOC OBJ #!optional ARGNAMprocedure
- error-natural-integer LOC OBJ #!optional ARGNAMprocedure
- error-negative-integer LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-integer LOC OBJ #!optional ARGNAMprocedure
error-fixnum
error-positive-fixnum
error-non-positive-fixnum
error-natural-fixnum
error-negative-fixnum
error-non-positive-fixnum
(import (type-errors-numbers fixnum))
- error-fixnum LOC OBJ #!optional ARGNAMprocedure
- error-positive-fixnum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-fixnum LOC OBJ #!optional ARGNAMprocedure
- error-natural-fixnum LOC OBJ #!optional ARGNAMprocedure
- error-negative-fixnum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-fixnum LOC OBJ #!optional ARGNAMprocedure
error-bignum
error-positive-bignum
error-non-positive-bignum
error-negative-bignum
error-non-positive-bignum
(import (type-errors-numbers bignum))
- error-bignum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-bignum LOC OBJ #!optional ARGNAMprocedure
- error-natural-bignum LOC OBJ #!optional ARGNAMprocedure
- error-negative-bignum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-bignum LOC OBJ #!optional ARGNAMprocedure
error-ratnum
error-positive-ratnum
error-non-positive-ratnum
error-negative-ratnum
error-non-positive-ratnum
(import (type-errors-numbers ratnum))
- error-ratnum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-ratnum LOC OBJ #!optional ARGNAMprocedure
- error-positive-ratnum LOC OBJ #!optional ARGNAMprocedure
- error-negative-ratnum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-ratnum LOC OBJ #!optional ARGNAMprocedure
error-float
error-flonum
error-positive-flonum
error-non-positive-flonum
error-negative-flonum
error-non-positive-flonum
(import (type-errors-numbers flonum))
- error-flonum LOC OBJ #!optional ARGNAMprocedure
- error-float LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-flonum LOC OBJ #!optional ARGNAMprocedure
- error-positive-flonum LOC OBJ #!optional ARGNAMprocedure
- error-negative-flonum LOC OBJ #!optional ARGNAMprocedure
- error-non-positive-flonum LOC OBJ #!optional ARGNAMprocedure
error-cplxnum
(import (type-errors-numbers cplxnum))
Type Errors Numbers Interval
Usage
(import (type-errors-numbers interval))
error-range
error-open-interval
error-closed-interval
error-half-open-interval
error-half-closed-interval
error-interval
- error-interval LOC NUM LEFT MINNUM MAXNUM RIGHT #!optional ARGNAMprocedure
LEFT is a character, symbol, or string that denotes the symbolic opening of an interval.
RIGHT is a character, symbol, or string that denotes the symbolic closing of an interval.
Type Errors Structured
Usage
(import type-errors-structured)
error-procedure
error-input-port
error-output-port
error-list
- error-list LOC OBJ #!optional ARGNAMprocedure
error-alist
error-plist
error-pair
- error-pair LOC OBJ #!optional ARGNAMprocedure
error-blob
- error-blob LOC OBJ #!optional ARGNAMprocedure
error-vector
error-structure
- error-structure LOC OBJ TAG #!optional ARGNAMprocedure
error-record and error-record-type are essentially synonyms.
error-string
Type Errors Atoms
Usage
(import type-errors-atoms)
error-symbol
error-keyword
error-char
- error-char LOC OBJ #!optional ARGNAMprocedure
error-boolean
SRFI 4 Checks
Usage
(import srfi-4-checks)
check-s8vector
check-u8vector
check-s16vector
check-u16vector
check-s32vector
check-u32vector
check-s64vector
check-u64vector
check-f32vector
check-f64vector
- check-s8vector LOC OBJ #!optional ARGNAMprocedure
- check-u8vector LOC OBJ #!optional ARGNAMprocedure
- check-s16vector LOC OBJ #!optional ARGNAMprocedure
- check-u16vector LOC OBJ #!optional ARGNAMprocedure
- check-s32vector LOC OBJ #!optional ARGNAMprocedure
- check-u32vector LOC OBJ #!optional ARGNAMprocedure
- check-s64vector LOC OBJ #!optional ARGNAMprocedure
- check-u64vector LOC OBJ #!optional ARGNAMprocedure
- check-f32vector LOC OBJ #!optional ARGNAMprocedure
- check-f64vector LOC OBJ #!optional ARGNAMprocedure
SRFI 4 Errors
Usage
(import srfi-4-errors)
error-s8vector
error-u8vector
error-s16vector
error-u16vector
error-s32vector
error-u32vector
error-s64vector
error-u64vector
error-f32vector
error-f64vector
- error-s8vector LOC OBJ #!optional ARGNAMprocedure
- error-u8vector LOC OBJ #!optional ARGNAMprocedure
- error-s16vector LOC OBJ #!optional ARGNAMprocedure
- error-u16vector LOC OBJ #!optional ARGNAMprocedure
- error-s32vector LOC OBJ #!optional ARGNAMprocedure
- error-u32vector LOC OBJ #!optional ARGNAMprocedure
- error-s64vector LOC OBJ #!optional ARGNAMprocedure
- error-u64vector LOC OBJ #!optional ARGNAMprocedure
- error-f32vector LOC OBJ #!optional ARGNAMprocedure
- error-f64vector LOC OBJ #!optional ARGNAMprocedure
Type Checks System
Does not allow invalid argument name specification.
Usage
(import (check-errors sys))
Note that the extension is provided as an inline. An -unsafe compile can remove the checks!
check-list
check-pair
check-vector
check-boolean
check-char
check-exact
check-inexact
check-number
check-integer
check-real
check-fixnum
check-string
check-symbol
check-keyword
check-output-port
check-input-port
check-locative
check-closure
check-procedure
check-byte-vector
check-blob
check-structure
check-exact-integer
check-exact-unsigned-integer
check-fixnum-in-range
- check-list LOC OBJprocedure
- check-pair LOC OBJprocedure
- check-vector LOC OBJprocedure
- check-boolean LOC OBJprocedure
- check-char LOC OBJprocedure
- check-exact LOC OBJprocedure
- check-inexact LOC OBJprocedure
- check-number LOC OBJprocedure
- check-integer LOC OBJprocedure
- check-real LOC OBJprocedure
- check-fixnum LOC OBJprocedure
- check-string LOC OBJprocedure
- check-symbol LOC OBJprocedure
- check-keyword LOC OBJprocedure
- check-output-port LOC OBJprocedure
- check-input-port LOC OBJprocedure
- check-locative LOC OBJprocedure
- check-closure LOC OBJprocedure
- check-procedure LOC OBJprocedure
- check-byte-vector LOC OBJprocedure
- check-blob LOC OBJprocedure
- check-structure LOC OBJ TAGprocedure
- check-exact-integer LOC OBJprocedure
- check-exact-unsigned-integer LOC OBJprocedure
- check-fixnum-in-range LOC OBJ LOW HIGHprocedure
Notes
- While a LOC is often enough to distinguish arguments of different expected types, an ARGNAM should be supplied otherwise.
;describes a #!key argument (check-symbol 'v-op oper #:operation) ;more descriptive (and specific) (check-integer 'v-op x "x coordinate") (check-integer 'v-op y "y coordinate")
- Assuming predicates are available for all used types then checks can be made using only define-check+error-type, reducing the runtime dependencies.
(import (check-errors basic)) (define-check+error-type my-type)
- If a module/library only uses system types & doesn't need (having disjoint types), or want, argument disambiguation by name then (import (check-errors sys)).
(define (func x a y b) (baz (check-exact 'func x) (check-inexact 'func y)) (bar (check-symbol 'func a) (check-string 'func b)) ...)
- Note that check-float is not check-inexact, unless:
(import (check-errors sys) miscmacros) (define-syntax-rule (check-float . ?args) (check-inexact . ?args))
However the error message will not mention a float.
- If "-strict-types" are important for you then be sure to import from the libraries with a compiled types annotation file. CHICKEN doesn't "roll-up" the type annotations so the compiler will miss them unless the actual exporting module is specified, and not an omnibus module.
- The (check-...) procedure will return the checked object so replacing the 1st argument variable reference with the check form will save a fetch.
(define (func x y) (foo (bar (baz (check-Tx 'func x 'x) (check-Ty 'func y 'y)))) ) (define (func x y) (let* ((bazle (baz (check-Tx 'func x 'x) (check-Ty 'func y 'y))) (...uses bazle, x, y...) ) ...) )
- Any reliance on execution order is undefined!
(func (check-Tx 'func x 'x) 42 (op x)) ;<loud buzzer sound> ;* missing? (let ((a (foo (check-Tx 'func x 'x))) ;<loud buzzer sound> (b (op x)) ) ...)
Bugs & Limitations
- The make-*-message functions are English only; but pluggable, given the source. See "type-errors-en.incl.scm" & "type-errors-basic.scm".
Author
Repository
This egg is hosted on the CHICKEN Subversion repository:
https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/check-errors
If you want to check out the source code repository of this egg and you are not familiar with Subversion, see this page.
Version history
- 3.8.1
- Stop variable injection in define-... forms.
- 3.8.0
- Add define-check-structure.
- 3.7.1
- Fix inline file issue.
- 3.7.0
- Test improvements.
- 3.6.1
- .
- 3.6.0
- Add (type-checks/errors-numbers scheme/number/fixnum/integer/bignum/ratnum/cplxnum) modules.
- 3.5.1
- Fix check-structure return type. Inlining module (check-errors sys).
- 3.5.0 ; Add (check-errors sys) module.
- 3.4.0 ; Add (type-checks/errors-numbers interval) module.
- 3.3.1 ; Add (check-errors basic) module.
- 3.3.0 ; Add bignum/ratnum/cplxnum/float. Fix complex/rational.
- 3.2.6 ; .
- 3.2.5 ; Test improvements.
- 3.2.4 ; Add make-error-interval-message, make-warning-type-message, & make-location-message. The make-*-message API is pure. Fix check-* routines unbound checking.
- 3.2.3 ; .
- 3.2.2 ; .
- 3.2.1 ; .
- 3.2.0 ; .
- 3.1.2 ; .
- 3.1.1 ; .
- 3.1.0 ; Add type-errors/checks-basic/numbers/atoms/structured modules.
- 3.0.0 ; CHICKEN 5 release.
License
Copyright (C) 2009-2024 Kon Lovett. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.