object
Type checking predicates. User extensible. New types can be defined by adding clauses for the type/1 and check/2 multifile predicates.
Paulo Moura
1.16
2018/3/15
static, context_switching_calls, complements(restrict)
(no dependencies on other entities)
Table of defined types. A new type can be registered by defining a clause for this predicate and adding a clause for the check/2 multifile predicate.
static, multifile
type(Type)
type(?callable) – zero_or_more
True if the given term is of the specified type. Fails otherwise.
static
valid(Type,Term)
valid(@callable,@term) – zero_or_one
True if the given term is of the specified type. Throws an error otherwise using the format error(Error, Context). For the possible values of Error see the check/2 predicate.
static
check(Type,Term,Context)
check(@callable,@term,@term) – one_or_error
True if the given term is of the specified type. Throws an error otherwise. A new type can be added by defining a clause for this predicate and registering it by adding a clause for the type/1 multifile predicate.
static, multifile
check(Type,Term)
check(@callable,@term) – one_or_error
instantiation_error
type_error(Type, Term)
domain_error(Domain, Term)
existence_error(Type, Term)
(none)
(none)