From: Mark Date: Tue, 26 Sep 2023 19:46:21 +0000 (-0600) Subject: filter our builtins from current_predicate/1 (#153) X-Git-Tag: remove~80 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=2efe95f2fb84427bd827d5b84df8bb5230e5b848;p=scryer-prolog.git filter our builtins from current_predicate/1 (#153) --- diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index 4a54ad91..34b26808 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -3908,6 +3908,11 @@ impl Machine { } ); + if self.indices.builtin_property((name, arity)) { + self.machine_st.fail = true; + return; + } + self.machine_st.fail = self .indices .get_predicate_code_index(name, arity, module_name) @@ -3987,6 +3992,10 @@ impl Machine { }; for (name, arity) in code_dir.keys() { + if self.indices.builtin_property((*name, *arity)) { + continue; + } + if name_match(pred_atom, *name) && arity_match(pred_arity, *arity) { self.machine_st.heap.extend(functor!( atom!("/"),