Files
mercury/extras/morphine/non-regression-tests/solutions
Erwan Jahier 33640b995c One more file where removing the fourth argument of filter was
necessary.

--
Estimated hours taken: .1
branches: main.


extras/morphine/non-regression-tests/solutions:
	Remove the fourth argument of filter.Index: non-regression-tests/solutions
2001-08-29 15:30:43 +00:00

25 lines
544 B
Plaintext

%------------------------------------------------------------------------------%
% Copyright (C) 1999-2001 INRIA/INSA.
%
% Author : Erwan Jahier <jahier@irisa.fr>
%
% define a monitor that collect solutions
:- import_module list.
:- type accumulator_type == list(solutions).
:- type solutions ---> sol(procedure, arguments).
initialize([]).
filter(Event, AccIn, AccOut) :-
(
port(Event) = exit,
not(member(sol(proc(Event), arguments(Event)), AccIn))
->
AccOut = [sol(proc(Event), arguments(Event))|AccIn]
;
AccOut = AccIn
).