"LudovicoVan" <
ju...@diegidio.name> wrote in message
news:k7lnb8$te$1...@dont-email.me...
> - nan_validation is a module providing type testing and validation
> predicates (builds on library(error)).
Just to give an idea, this is an excerpt from the test_type/2 predicate doc:
---------------------------------------------------------------------
Supports all types documented in error:must_be/2 plus those listed here:
=predicate=
=atom=/=nonneg=
=formatted=
=text=-=list= _or_ =text=
=formal_error=
=callable=
=term_order=
=oneof=([=, <, >])
=pair=(=KeyType=-=ValueType=)
=KeyType=-=ValueType=
=var=(=SubType=)
=var= _or_ =SubType=
=or=([=Type1=, ..., =TypeN=])
=Type1= _or_ ... _or_ =TypeN=
=m_var=(=SubType=)
=atom=:=var= _or_ =var(SubType)=
=m_predicate=
=atom=:=predicate= _or_ =predicate=
=m_callable=
=atom=:=callable= _or_ =callable=
=s_callable=(_Struct_:=struct=)
=callable= _and_ =has_struct=(_Struct_, Term) (*)
=struct=
=callable= _with_ "_terminals_" =atom= _or_ =var=:=SubType= (*)
=type=
=callable= _and_ =clause=(=error=:=has_type=(Term, _))
(*) The implicit predicate has_struct/2 tests functor equality of
non-"terminal" sub-terms of _Struct_ to the corresponding sub-terms of
Term. For "terminal" sub-terms of _Struct_, specifically meaning any
encountered (sub-)terms of _Struct_ that are of type =var=:=SubType=,
has_struct/2 tests that the corresponding (sub-)term of Term satisfies
=SubType=. (Variable names in "terminals" of _Struct_ are ignored but
useful for self-documentation.)
---------------------------------------------------------------------
-LV