scryer-prolog
scryer-prolog copied to clipboard
initialization/1sometimes executed too early
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).
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.