[m-rev.] Bugfixes for test failures due to solver types changes

Julien Fischer juliensf at cs.mu.OZ.AU
Fri Sep 10 18:00:42 AEST 2004


On Thu, 9 Sep 2004, Ralph Becket wrote:

> Estimated hours taken: 3
> Branches: main
>
> Bugfixes (mostly) related to the recent solver types changes.
>
...
>
> compiler/prog_io.m:
> 	Fixed a bug in make_maybe_where_details where a solver type without
> 	user defined equality or comparison would get a
> 	`yes(unify_compare(no, no))' result rather than just `no'.
>

This change broke the compiler.  I've committed the following diff
in order to fix this.

Estimated hours taken: 0.5
Branches: main

compiler/prog_io.m:
	Fix some compilation errors in Ralph's
	bug fixes for the solver types code.

Julien.

Index: prog_io.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_io.m,v
retrieving revision 1.229
diff -u -r1.229 prog_io.m
--- prog_io.m	10 Sep 2004 03:50:27 -0000	1.229
+++ prog_io.m	10 Sep 2004 07:57:33 -0000
@@ -1967,39 +1967,39 @@
 		EqualityIsResult,
 		ComparisonIsResult,
 		WhereEndResult,
-		WhereTerm) =
+		WhereTerm) = Result :-
 	(
 		TypeIsAbstractNoncanonicalResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		RepresentationIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		InitialisationIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		GroundIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		AnyIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		EqualityIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		ComparisonIsResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		WhereEndResult = error(String, Term)
 	->
-		error(String, Term)
+		Result = error(String, Term)
 	;
 		TypeIsAbstractNoncanonicalResult = ok(yes(_))
 	->
@@ -2014,9 +2014,9 @@
 			EqualityIsResult       = ok(no),
 			ComparisonIsResult     = ok(no)
 		->
-			ok(no, yes(abstract_noncanonical_type(IsSolverType)))
+			Result = ok(no, yes(abstract_noncanonical_type(IsSolverType)))
 		;
-			error("`where type_is_abstract_noncanonical' " ++
+			Result = error("`where type_is_abstract_noncanonical' " ++
 				" excludes other `where ...' attributes",
 				WhereTerm)
 		)
@@ -2042,9 +2042,9 @@
 				MaybeUnifyCompare = yes(unify_compare(
 					MaybeEqPred, MaybeCmpPred))
 			),
-			ok(yes(MaybeSolverTypeDetails, MaybeUnifyCompare))
+			Result = ok(MaybeSolverTypeDetails, MaybeUnifyCompare)
 		;
-			error("missing solver type attribute: " ++
+			Result = error("missing solver type attribute: " ++
 				"required solver type attributes are " ++
 				"`representation', `initialisation', " ++
 				"`ground', and `any'", WhereTerm)
@@ -2058,15 +2058,15 @@
 		;	AnyIsResult            = ok(yes(_))
 		)
 	->
-		error("solver type attribute given for non-solver type",
+		Result = error("solver type attribute given for non-solver type",
 			WhereTerm)
 	;
 		EqualityIsResult = ok(MaybeEqPred),
 		ComparisonIsResult = ok(MaybeCmpPred)
 	->
-		ok(no, yes(unify_compare(MaybeEqPred, MaybeCmpPred)))
+		Result = ok(no, yes(unify_compare(MaybeEqPred, MaybeCmpPred)))
 	;
-		func_error("prog_io__make_maybe_where_details: " ++
+		error("prog_io__make_maybe_where_details: " ++
 			"shouldn't have reached this point!")
 	).

--------------------------------------------------------------------------
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