explain/1,2 can be quite useful, but while testing some predicates (for which I knew there existed multiple instances) I found some seemingly odd behavior regarding include
, namely:
- “include” won’t report the existence of
include/1
andinclude/3
(there are also DCG rules, again not reported); - “include/1” won’t report the predicate (as per above);
- “include/3” reports the predicate but won’t give further info about it (definition file or references).
?- explain(include).
% include is an atom
true.
?- explain(include/1).
true.
?- explain(include/3).
% include/3 is a predicate
true.
Is this expected behavior and if so, why?