Did you know ... Search Documentation:
Pack xlibrary -- prolog/neck.pl
PublicShow source

Implements several predicates to establish that everything above them should be evaluated at compile time, be careful since such part can only contain predicates already defined. In case of non-determinism, several clauses would be generated. This is a practical way to generate automatic clauses with a proper instantiation of the head. If the code can not be expanded, it will succeed without side effects.

These predicates can also be used in declarations, although in that case, no warnings will be shown about run-time parts being executed, since declarations are executed at compile-time.

 neck is det
 neck(L, L) is det
neck/0 and neck//0 are used if you want to put the body in a separated predicate, and consider it the run-time only part of it, meaning that you can not use it until the compilation of the module has finished.
 necki is det
 necki(L, L) is det
necki/0 and necki//0 (i=inlined) are used if you don't want to create ancillary predicates for the body, but rather have the body inlined.
 necks is det
 necks(L, L) is det
necks/0 and necks//0 (s=silent) will not warn you if the non-expandable parts are called at compile-time.
 neckis is det
 neckis(L, L) is det
neckis/0 and neckis//0 are a combination of inlined and silent.

Undocumented predicates

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

 neck(Arg1, Arg2)
 necki(Arg1, Arg2)
 necks(Arg1, Arg2)
 neckis(Arg1, Arg2)
 track_deps(Arg1, Arg2, Arg3, Arg4, Arg5)
 collect_head_calls(Arg1, Arg2)
 head_calls_hook(Arg1, Arg2, Arg3, Arg4, Arg5)