Is this normal or bug on module resolution under ~/lib/swipl/pack ?
I spent some time on this confusion but only to fail.
I might still miss some basics on module.
*** begin of testundef.pl ***
:- module(testundef, []).
aaa :- bbb.
user:bbb:- writeln(hello).
*** end of testundef.pl ***
Under the directory, for example, ~/Desktop
(but not under ~/lib/swipl/pack),this works as expected:
?- use_module(misc(testundef)).
?- testundef:aaa.
hello
true.
However, the following 2 causes error.
2. Putting the same code at ~/lib/swipl/pack/pac/prolog/misc/testundef.pl
% swipl
?- use_module(library(pac)).
true.
?- use_module(misc(testundef)).
true.
?- testundef:aaa.
ERROR: Undefined procedure: testundef:bbb/0
ERROR: However, there are definitions for:
ERROR: bbb/0
false.