Did you know ... Search Documentation:
Pack nan_common -- prolog/nan_validation.pl
PublicShow source

Nan.Validation 1.2: Validation Operations (nan_validation)

This module is part of Nan.Common 1.2: Common Operations (nan_common) http://julio.diegidio.name/Projects/Prolog/Nan.Common

This module provides common operations for testing and validation of term types, domains and custom conditions, and for the construction of exception and error terms.

This module abstracts and extends the type testing and validation system provided by library(error). In particular, this module extends to the types that are documented in test_type/2.

NOTE: The type testing and validation system is extensible: specifically, error:has_type/2 is a multifile (and dynamic) predicate. See library(error) for details.

author
- J.P. Di Egidio
version
- 1.2
license
- GPL3 + SWI-Exception
To be done
- Extend the type system beyond error:has_type/2 (for type spec).

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 test_type(Arg1, Arg2)
 test_domain(Arg1, Arg2, Arg3)
 validate_type(Arg1, Arg2, Arg3)
 validate_type(Arg1, Arg2, Arg3, Arg4)
 validate_domain(Arg1, Arg2, Arg3, Arg4)
 validate_domain(Arg1, Arg2, Arg3, Arg4, Arg5)
 validate_condition(Arg1, Arg2, Arg3)
 validate_condition(Arg1, Arg2, Arg3, Arg4)
 type_exception(Arg1, Arg2, Arg3, Arg4)
 type_exception(Arg1, Arg2, Arg3, Arg4, Arg5)
 domain_exception(Arg1, Arg2, Arg3, Arg4, Arg5)
 domain_exception(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
 custom_exception(Arg1, Arg2, Arg3)
 custom_exception(Arg1, Arg2, Arg3, Arg4)
 type_error(Arg1, Arg2, Arg3)
 domain_error(Arg1, Arg2, Arg3, Arg4)
 current_caller(Arg1)