From 24e6c31c4429d52b11b5ed7a4e798c63b27d854e Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Wed, 3 Feb 2021 23:45:06 +0100 Subject: [PATCH] add meta_predicate declaration for with_local_attributes/3 This is needed for all_distinct/1 etc. Example: ?- all_distinct([X,Y,Z]). clpz:all_distinct([X,Y,Z]) ; false. --- src/lib/clpz.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/clpz.pl b/src/lib/clpz.pl index fda2f309..e72a33c1 100644 --- a/src/lib/clpz.pl +++ b/src/lib/clpz.pl @@ -6047,6 +6047,8 @@ remove_attr(Var, Attr) :- functor(Term, Attr, 1), put_atts(Var, -Term). +:- meta_predicate with_local_attributes(?, 0, ?). + with_local_attributes(Vars, Goal, Result) :- catch((Goal, maplist(del_all_attrs, Vars), -- 2.54.0