[MLton-commit] r4742
Vesa Karvonen
vesak at mlton.org
Sat Oct 21 12:22:51 PDT 2006
Documentation.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -9,7 +9,7 @@
*)
signature CHAR = sig
include CHAR
-
+
(** == Bounds == *)
val minOrd : Int.int
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/emb.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -16,7 +16,18 @@
type ('a, 'b) emb = ('a, 'b) emb
val id : ('a, 'a) emb
+ (**
+ * The identity embedding. This is always equivalent to {(fn a => a,
+ * SOME)}.
+ *)
val to : ('a, 'b) emb -> 'a -> 'b
+ (**
+ * Extracts the injection part of the given embedding.
+ *)
+
val from : ('a, 'b) emb -> 'b -> 'a option
+ (**
+ * Extracts the projection part of the given embedding.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -13,19 +13,53 @@
(** == Bounds == *)
val bounds : (int * int) option
+ (**
+ * Pair of the minimal and maximal integers, respectively,
+ * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
+ * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
+ * maxInt)}.
+ *)
(** == Embeddings == *)
val embString : (int, string) emb
+ (**
+ * An embedding of integers into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : (int, Int.int) iso
+ (**
+ * An isomorphism between integers of type {int} and the default
+ * integer type. It is always equivalent to {(toInt, fromInt)}. Note
+ * that one of the injection and projection parts may be partial.
+ *)
+
val isoLarge : (int, LargeInt.int) iso
+ (**
+ * An isomorphism between integers of type {int} and integers of type
+ * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
+ * Note that the projection part may be partial.
+ *)
(** == Predicates == *)
val isEven : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n} for some
+ * integer {n}.
+ *)
+
val isOdd : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n+1} for some
+ * integer {n}.
+ *)
+
val isZero : int -> bool
+ (**
+ * Returns true if the given integer is {0}.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -13,19 +13,53 @@
(** == Bounds == *)
val bounds : (int * int) option
+ (**
+ * Pair of the minimal and maximal integers, respectively,
+ * representable by {int}. If {minInt = NONE} and {maxInt = NONE},
+ * this is also {NONE}. Otherwise this is {SOME (valOf minInt, valOf
+ * maxInt)}.
+ *)
(** == Embeddings == *)
val embString : (int, string) emb
+ (**
+ * An embedding of integers into strings. It is always equivalent to
+ * {(toString, fromString)}.
+ *)
(** == Isomorphisms == *)
val isoInt : (int, Int.int) iso
+ (**
+ * An isomorphism between integers of type {int} and the default
+ * integer type. It is always equivalent to {(toInt, fromInt)}. Note
+ * that one of the injection and projection parts may be partial.
+ *)
+
val isoLarge : (int, LargeInt.int) iso
+ (**
+ * An isomorphism between integers of type {int} and integers of type
+ * {LargeInt.int}. It is always equivalent to {(toLarge, fromLarge)}.
+ * Note that the projection part may be partial.
+ *)
(** == Predicates == *)
val isEven : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n} for some
+ * integer {n}.
+ *)
+
val isOdd : int -> bool
+ (**
+ * Returns true if the given integer is of the form {2*n+1} for some
+ * integer {n}.
+ *)
+
val isZero : int -> bool
+ (**
+ * Returns true if the given integer is {0}.
+ *)
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-21 13:33:16 UTC (rev 4741)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/iso.sig 2006-10-21 19:22:49 UTC (rev 4742)
@@ -17,7 +17,18 @@
type ('a, 'b) iso = ('a, 'b) iso
val id : ('a, 'a) iso
+ (**
+ * The identity isomorphism. This is always equivalent to {(fn a => a,
+ * fn a => a)}.
+ *)
val to : ('a, 'b) iso -> 'a -> 'b
+ (**
+ * Extracts the injection part of the given isomorphism.
+ *)
+
val from : ('a, 'b) iso -> 'b -> 'a
+ (**
+ * Extracts the projection part of the given isomorphism.
+ *)
end
More information about the MLton-commit
mailing list