trivial diff: sort declared constraints

David Glen JEFFERY dgj at cs.mu.OZ.AU
Fri Jan 23 13:45:10 AEDT 1998


Hi,

Here's a little fix that I just committed. (Thanks for pointing this one out,
Tom).



Estimated hours taken: 1/4

compiler/typecheck.m:
	Sort the declared typeclass constraints before comparing them to the
	calculated constraints.


cvs diff: Diffing compiler
Index: compiler/typecheck.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/typecheck.m,v
retrieving revision 1.226
diff -u -r1.226 typecheck.m
--- typecheck.m	1998/01/18 12:58:55	1.226
+++ typecheck.m	1998/01/23 02:34:39
@@ -2826,7 +2826,9 @@
 typecheck_constraints(yes, TypeCheckInfo, TypeCheckInfo).
 typecheck_constraints(no, TypeCheckInfo0, TypeCheckInfo) :-
 		%get the declared constraints
-	typecheck_info_get_constraints(TypeCheckInfo0, DeclaredConstraints),
+	typecheck_info_get_constraints(TypeCheckInfo0, DeclaredConstraints0),
+	list__sort_and_remove_dups(DeclaredConstraints0, DeclaredConstraints),
+
 
 	typecheck_info_get_type_assign_set(TypeCheckInfo0, TypeAssignSet0),
 
cvs diff: Diffing compiler/notes

love and cuddles,
dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
MEngSc student,                 |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.



More information about the developers mailing list