added eq_ord
authorhaftmann
Wed, 21 Dec 2005 15:18:36 +0100
changeset 18452 5ea633c9bc05
parent 18451 5ff0244e25e8
child 18453 2b2fbc32550e
added eq_ord
src/Pure/library.ML
--- a/src/Pure/library.ML	Wed Dec 21 15:18:17 2005 +0100
+++ b/src/Pure/library.ML	Wed Dec 21 15:18:36 2005 +0100
@@ -223,6 +223,7 @@
   (*orders*)
   val rev_order: order -> order
   val make_ord: ('a * 'a -> bool) -> 'a * 'a -> order
+  val eq_ord: ('a -> order) -> 'a -> bool
   val int_ord: int * int -> order
   val string_ord: string * string -> order
   val fast_string_ord: string * string -> order
@@ -1079,6 +1080,11 @@
   else if rel (y, x) then GREATER
   else EQUAL;
 
+fun eq_ord ord xy =
+  case ord xy
+   of EQUAL => true
+    | _ => false;
+
 val int_ord = Int.compare;
 val string_ord = String.compare;