Merge pull request #787 from triska/rebis-dev
add meta_predicate declaration for with_local_attributes/3
This commit is contained in:
@@ -5884,10 +5884,12 @@ difference_arcs([V|Vs], FL0) -->
|
||||
|
||||
writeln(T) :- write(T), nl.
|
||||
|
||||
:- meta_predicate must_succeed(0).
|
||||
|
||||
must_succeed(G) :-
|
||||
(G -> true
|
||||
;write(failed-G), halt
|
||||
).
|
||||
( G -> true
|
||||
; throw(failed-G)
|
||||
).
|
||||
|
||||
enumerate([], _) --> [].
|
||||
enumerate([N|Ns], V) -->
|
||||
@@ -6047,6 +6049,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),
|
||||
|
||||
Reference in New Issue
Block a user