[m-dev.] [reuse] diff: implement sr_choice

Peter Ross petdr at miscrit.be
Tue Oct 10 22:22:45 AEDT 2000


Woops left something out.

===================================================================


Estimated hours taken: 0.1

sr_choice.m:
    In select_reuses actually call the predicate which does the
    selection.


Index: sr_choice.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_choice.m,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 sr_choice.m
--- sr_choice.m	2000/10/10 11:11:56	1.1.2.3
+++ sr_choice.m	2000/10/10 11:15:51
@@ -225,12 +225,16 @@
 			reuse_conds	:: list(reuse_condition)
 		).
 
+:- func selection_info_init = selection_info.
+
+selection_info_init = selection_info(set__init, set__init, []).
+
 :- pred select_reuses(selection::in, hlds_goal::in, hlds_goal::out,
 		list(reuse_condition)::out) is det.
 
-select_reuses(_SelectionRule, Goal0, Goal, ReuseConditions) :-
-	Goal = Goal0,
-	ReuseConditions = [].
+select_reuses(SelectionRule, Goal0, Goal, ReuseConditions) :-
+	select_reuses(SelectionRule, Goal0, Goal, selection_info_init, Info),
+	ReuseConditions = Info ^ reuse_conds.
 
 :- pred select_reuses(selection::in, hlds_goal::in, hlds_goal::out,
 		selection_info::in, selection_info::out) is det.

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list