The declaring module is the module in which the predicate was declared.
The module is the module to which the predicate is qualified.
:- module(a, []).
%: Declare a clause of pred/0 in the module b FROM the module a
b:pred. % DECLARING MODULE = a | MODULE = b
%: Declare a clause of pred/0 in the module a FROM itself
pred.
%: (OR)
a:pred.
Problem: right now, the declaring module always refers to the "module", and sometimes leads to cases where that module is not available yet or ever (such as when defining foreign hooks).
The declaring module is the module in which the predicate was declared.
The module is the module to which the predicate is qualified.