G3Kappa / Ergo

Other
4 stars 0 forks source link

Differentiate between Declaring Module and Module (Predicate) #86

Open G3Kappa opened 6 months ago

G3Kappa commented 6 months ago

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.
G3Kappa commented 6 months ago

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).