[m-rev.] trivial diff: delete an unnecessary function

Julien Fischer juliensf at cs.mu.OZ.AU
Fri Mar 4 01:00:48 AEDT 2005


Estimated hours taken: 0.1
Branches: main

compiler/ml_optimize.m:
	Delete the function maybe_apply from this module and
	just use the equivalent map_maybe function from the
	standard library.

Julien.

Index: ml_optimize.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_optimize.m,v
retrieving revision 1.28
diff -u -r1.28 ml_optimize.m
--- ml_optimize.m	19 Jan 2005 03:10:43 -0000	1.28
+++ ml_optimize.m	3 Mar 2005 13:57:00 -0000
@@ -158,7 +158,7 @@
 		Stmt0 = if_then_else(Rval, Then, MaybeElse),
 		Stmt = if_then_else(Rval,
 			optimize_in_statement(OptInfo, Then),
-			maybe_apply(optimize_in_statement(OptInfo), MaybeElse))
+			map_maybe(optimize_in_statement(OptInfo), MaybeElse))
 	;
 		Stmt0 = switch(Type, Rval, Range, Cases0, Default0),
 		Stmt = switch(Type, Rval, Range,
@@ -1266,14 +1266,6 @@
 eliminate_var_in_trail_op(prune_tickets_to(Rval0), prune_tickets_to(Rval),
 		!VarElimInfo) :-
 	eliminate_var_in_rval(Rval0, Rval, !VarElimInfo).
-
-%-----------------------------------------------------------------------------%
-
-        % Maps T into V, inside a maybe .
-:- func maybe_apply(func(T) = V, maybe(T)) = maybe(V).
-
-maybe_apply(_, no) = no.
-maybe_apply(F, yes(T)) = yes(F(T)).

 %-----------------------------------------------------------------------------%


--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list