user:goalexpansion/3¶
user:goalexpansion(+ G,+ M,- NG)*
The goal_expansion//33 hook is an user-defined procedure that is called after term expansion when compiling or asserting goals for each sub-goal in a clause. The first argument is bound to the goal and the second to the module under which the goal G will execute. If goal_expansion//33 succeeds the new sub-goal NG will replace G and will be processed in the same way. If goal_expansion//33 fails the system will use the default expandion mechanism.
This hook is called:
-
at compilation time;
-
when running a query in the top-level
Older versions of YAP would call this procedure at every meta-call.