Found a bug: it involves a variable in a single branch and a lambda

library(yall) is broken in the sense that the compiled behaviour differs from interpreted behaviour for variables shared with the rest of the clause. If you load the code without explicitly loading the library it is used interpreted. If you then use it and reload, it is compiled. So, always make sure library(yall) is loaded and make sure all meta-predicates through with it is called are loaded (or built-in). You can enable

 :- set_prolog_flag(warn_autoload, true).

to get a warning about libraries that use goal/term expansion and are not loaded before the code is called. The default is still false. Might change to true shortly. It still occasionally gives a few somewhat misleading warnings :frowning:

If you use library(yall), you must really understand it :frowning: I recommend using listing/1 on the predicates in which you use it to make sure it is compiled. Interpreted yall is semantically different and very slow.

2 Likes