src/Tools/Metis/src/Ordered.sml
changeset 39348 6f9c9899f99f
child 39349 2d0a4361c3ef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/Metis/src/Ordered.sml	Mon Sep 13 21:09:43 2010 +0200
@@ -0,0 +1,23 @@
+(* ========================================================================= *)
+(* ORDERED TYPES                                                             *)
+(* Copyright (c) 2004-2006 Joe Hurd, distributed under the GNU GPL version 2 *)
+(* ========================================================================= *)
+
+structure IntOrdered =
+struct type t = int val compare = Int.compare end;
+
+structure IntPairOrdered =
+struct
+
+type t = int * int;
+
+fun compare ((i1,j1),(i2,j2)) =
+    case Int.compare (i1,i2) of
+      LESS => LESS
+    | EQUAL => Int.compare (j1,j2)
+    | GREATER => GREATER;
+
+end;
+
+structure StringOrdered =
+struct type t = string val compare = String.compare end;