scryer-prolog icon indicating copy to clipboard operation
scryer-prolog copied to clipboard

initialization/1sometimes executed too early

Open UWN opened this issue 2 years ago • 1 comments

ulrich@gupu:~/scryer$ cat issue2155.pl 
:- initialization(p).
:- use_module(library(clpz)).
p.


ulrich@gupu:~/scryer$ /opt/gupu/scryer-prolog/target/release/scryer-prolog issue2155.pl
   error(existence_error(procedure,p/0),p/0).
   error(permission_error(access,private_procedure,module_does_not_contain_claimed_export),load/1).

UWN avatar Nov 10 '23 12:11 UWN

This seems to be the same as https://github.com/mthom/scryer-prolog/issues/1493#issuecomment-1854423876. If you change the order of initialization/1 and use_module/1 this works. It also works if you use a module such as library(lists) that doesn't define operators.

bakaq avatar Dec 13 '23 20:12 bakaq