]> Repositorios git - scryer-prolog.git/commitdiff
add meta_predicate declaration for with_local_attributes/3
authorMarkus Triska <[email protected]>
Wed, 3 Feb 2021 22:45:06 +0000 (23:45 +0100)
committerMarkus Triska <[email protected]>
Wed, 3 Feb 2021 22:45:21 +0000 (23:45 +0100)
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

index fda2f3093cd8be692ac12f1a914b04bbe11f2308..e72a33c145313152517be5daa4f7d6e9445a1403 100644 (file)
@@ -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),