Availability:built-in
The predicate goal_expansion/2
is first called in the module that is being compiled, and then on the user
module. If Goal is of the form Module:Goal
where Module is instantiated,
goal_expansion/2
is called on Goal using rules from module
Module followed by user.
Only goals appearing in the body of clauses when reading a source file are expanded using this mechanism, and only if they appear literally in the clause, or as an argument to a defined meta-predicate that is annotated using `0' (see meta_predicate/1). Other cases need a real predicate definition.