Hi, consider this simple module:
:- module(foo, []).
member(X, Y) :- throw(wrong).
:- meta_predicate test(0).
test(Goal) :- call(Goal).
From toplevel, I now try use_module(foo), foo:test(member(1, [1,2]))
and surprisingly get an exception. Is there a way to have a meta predicate see the same binding that the caller has, as calling member/2
after use_module(foo)
from the top level actually correctly calls lists:member/2
.
I am using SWI-Prolog 9.1.21, but behaviour is the same on 9.0.4. Also I tried using :
, ?
as specifier for the meta_predicate without any effect.