From: Markus Triska Date: Wed, 3 Feb 2021 22:45:06 +0000 (+0100) Subject: add meta_predicate declaration for with_local_attributes/3 X-Git-Tag: v0.9.0~150^2~66^2~3^2~1 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=24e6c31c4429d52b11b5ed7a4e798c63b27d854e;p=scryer-prolog.git 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. --- 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),