[MLton-commit] r5264

Vesa Karvonen vesak at mlton.org
Mon Feb 19 06:43:54 PST 2007


Starting work on concept signatures.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig

----------------------------------------------------------------------

Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig	2007-02-19 14:42:21 UTC (rev 5263)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig	2007-02-19 14:43:54 UTC (rev 5264)
@@ -0,0 +1,44 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * An ordered type implements a total order.  Note that it is possible to
+ * implement this signature, but not strictly fulfill the requirements of
+ * a total order.  This would be the case with {Real}.
+ *)
+signature ORDERED = sig
+   type ordered
+
+   val != : ordered BinPr.t
+   (** {i != j} returns {true} iff {i} is not equal to {j}. *)
+
+   val < : ordered BinPr.t
+   (** {i < j} returns {true} iff {i} is less than {j}. *)
+
+   val <= : ordered BinPr.t
+   (** {i <= j} returns {true} iff {i} is less than or equal to {j}. *)
+
+   val == : ordered BinPr.t
+   (** {i == j} returns {true} iff {i} is equal to {j}. *)
+
+   val > : ordered BinPr.t
+   (** {i > j} returns {true} iff {i} is greater than {j}. *)
+
+   val >= : ordered BinPr.t
+   (** {i >= j} returns {true} iff {i} is greater than or equal to {j}. *)
+
+   val compare : ordered Cmp.t
+   (**
+    * {compare (i, j)} returns {LESS}, {EQUAL}, or {GREATER} when {i} is
+    * less than, equal to, or greater than {j}, respectively.
+    *)
+
+   val max : ordered BinOp.t
+   (** Returns the larger of the arguments. *)
+
+   val min : ordered BinOp.t
+   (** Returns the smaller of the arguments. *)
+end


Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/concept/ordered.sig
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list