[MLton-commit] r4738

Vesa Karvonen vesak at mlton.org
Fri Oct 20 09:48:09 PDT 2006


Added documentation headers to signatures and reorganized specs.
Added missing extended MONO_VECTOR specs to extended STRING signature.

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

U   mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/char.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/mono-array.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/array.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,13 +7,19 @@
 (**
  * Extended {ARRAY} signature.
  *)
-
 signature ARRAY =
    sig
       include ARRAY
+
+      (** == Conversions == *)
+
+      val fromVector : 'a vector -> 'a array
+
       val toList : 'a array -> 'a list
+      val toVector : 'a array -> 'a vector
+
+      (** == Isomorphisms == *)
+
       val listIso : ('a array, 'a list) iso
-      val toVector : 'a array -> 'a vector
-      val fromVector : 'a vector -> 'a array
       val vectorIso : ('a array, 'a vector) iso
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/char.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -11,11 +11,11 @@
    sig
       include CHAR
 
-      val intIso : (char, Int.int) iso
+      (** == Bounds == *)
+
+      val minOrd : Int.int
       (**
-       * The isomorphism between characters and character codes.  It
-       * always equals {(ord, chr)}.  Note that the projection part of the
-       * isomorphism, namely {chr}, is likely to be a partial function.
+       * The least character code.  It always equals {0}.
        *)
 
       val boundsChar : char * char
@@ -24,14 +24,18 @@
        * {(minChar, maxChar)}.
        *)
 
-      val minOrd : Int.int
-      (**
-       * The least character code.  It always equals {0}.
-       *)
-
       val boundsOrd : Int.int * Int.int
       (**
        * Pair of the least and greatest character codes.  It always equals
        * {(minOrd, maxOrd)}.
        *)
+
+      (** == Isomorphisms == *)
+
+      val intIso : (char, Int.int) iso
+      (**
+       * The isomorphism between characters and character codes.  It
+       * always equals {(ord, chr)}.  Note that the projection part of the
+       * isomorphism, namely {chr}, is likely to be a partial function.
+       *)
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/int-inf.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,15 +7,26 @@
 (**
  * Extended {INT_INF} signature.
  *)
-
 signature INT_INF =
    sig
       include INT_INF
+
+      (** == Bounds == *)
+
+      val bounds : (int * int) option
+
+      (** == Embeddings == *)
+
+      val stringEmb : (int, string) emb
+
+      (** == Isomorphisms == *)
+
       val intIso : (int, Int.int) iso
       val largeIso : (int, LargeInt.int) iso
-      val stringEmb : (int, string) emb
-      val isZero : int -> bool
+
+      (** == Predicates == *)
+
       val isEven : int -> bool
       val isOdd : int -> bool
-      val bounds : (int * int) option
+      val isZero : int -> bool
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/integer.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,15 +7,26 @@
 (**
  * Extended {INTEGER} signature.
  *)
-
 signature INTEGER =
    sig
       include INTEGER
+
+      (** == Bounds == *)
+
+      val bounds : (int * int) option
+
+      (** == Embeddings == *)
+
+      val stringEmb : (int, string) emb
+
+      (** == Isomorphisms == *)
+
       val intIso : (int, Int.int) iso
       val largeIso : (int, LargeInt.int) iso
-      val stringEmb : (int, string) emb
-      val isZero : int -> bool
+
+      (** == Predicates == *)
+
       val isEven : int -> bool
       val isOdd : int -> bool
-      val bounds : (int * int) option
+      val isZero : int -> bool
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-array.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,16 +7,22 @@
 (**
  * Extended {MONO_ARRAY} signature.
  *)
-
 signature MONO_ARRAY =
    sig
       include MONO_ARRAY
+
+      (** == Conversions == *)
+
+      val fromPoly : elem Array.array -> array
+      val fromVector : vector -> array
+
       val toList : array -> elem list
+      val toPoly : array -> elem Array.array
+      val toVector : array -> vector
+
+      (** == Isomorphisms == *)
+
       val listIso : (array, elem list) iso
-      val toVector : array -> vector
-      val fromVector : vector -> array
+      val polyIso : (array, elem Array.array) iso
       val vectorIso : (array, vector) iso
-      val toPoly : array -> elem Array.array
-      val fromPoly : elem Array.array -> array
-      val polyIso : (array, elem Array.array) iso
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/mono-vector.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,13 +7,19 @@
 (**
  * Extended {MONO_VECTOR} signature.
  *)
-
 signature MONO_VECTOR =
    sig
       include MONO_VECTOR
+
+      (** == Conversions == *)
+
+      val fromPoly : elem Vector.vector -> vector
+
       val toList : vector -> elem list
+      val toPoly : vector -> elem Vector.vector
+
+      (** == Isomorphisms *)
+
       val listIso : (vector, elem list) iso
-      val toPoly : vector -> elem Vector.vector
-      val fromPoly : elem Vector.vector -> vector
       val polyIso : (vector, elem Vector.vector) iso
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/real.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,14 +7,19 @@
 (**
  * Extended {REAL} signature.
  *)
-
 signature REAL =
    sig
       include REAL
+
+      (** == Embeddings == *)
+
       val decimalEmb : (real, IEEEReal.decimal_approx) emb
+      val stringEmb : (real, string) emb
+
+      (** == Isomorphisms == *)
+
       val intIso : (real, Int.int) iso
+      val largeIntIso : (real, LargeInt.int) iso
       val largeIso : (real, LargeReal.real) iso
-      val largeIntIso : (real, LargeInt.int) iso
       val manExpIso : (real, {man : real, exp : int}) iso
-      val stringEmb : (real, string) emb
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/string.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,16 +7,23 @@
 (**
  * Extended {STRING} signature.
  *)
-
 signature STRING =
    sig
       include STRING
-      val listIso : (string, char list) iso
+
+      (** == Embeddings == *)
+
       val cStringEmb : (string, string) emb
       val stringEmb : (string, string) emb
 
+      (** == Isomorphisms == *)
+
+      val listIso : (string, char list) iso
+
+      (** == {MONO_VECTOR} == *)
+
+      type elem = char
       type vector = string
-      type elem = char
 
       val all : (elem -> bool) -> vector -> bool
       val app  : (elem -> unit) -> vector -> unit
@@ -29,10 +36,13 @@
       val foldr  : (elem * 'a -> 'a) -> 'a -> vector -> 'a
       val foldri : (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
       val fromList : elem list -> vector
+      val fromPoly : elem Vector.vector -> vector
       val length : vector -> int
       val mapi : (int * elem -> elem) -> vector -> vector
       val maxLen : int
+      val polyIso : (vector, elem Vector.vector) iso
       val tabulate : int * (int -> elem) -> vector
       val toList : vector -> elem list
+      val toPoly : vector -> elem Vector.vector
       val update : vector * int * elem -> vector
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/text.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -6,8 +6,10 @@
 
 (**
  * Extended {TEXT} signature.
+ *
+ * This signature is just a restament of the {TEXT} signature using the
+ * extended substructure signatures.
  *)
-
 signature TEXT =
    sig
       structure Char            : CHAR

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/vector.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,10 +7,15 @@
 (**
  * Extended {VECTOR} signature.
  *)
-
 signature VECTOR =
    sig
       include VECTOR
+
+      (** == Conversions == *)
+
+      val toList : 'a vector -> 'a list
+
+      (** == Isomorphisms == *)
+
       val listIso : ('a vector, 'a list) iso
-      val toList : 'a vector -> 'a list
    end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig	2006-10-20 16:11:14 UTC (rev 4737)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/word.sig	2006-10-20 16:48:08 UTC (rev 4738)
@@ -7,24 +7,39 @@
 (**
  * Extended {WORD} signature.
  *)
-
 signature WORD =
    sig
       include WORD
+
+      (** == Bounds == *)
+
+      val maxWord : word
+      val minWord : word
+
+      val bounds : word * word
+
+      (** == Conversions == *)
+
+      val fromWord : Word.word -> word
       val toWord : word -> Word.word
-      val fromWord : Word.word -> word
+
+      (** == Embeddings == *)
+
+      val stringEmb : (word, string) emb
+
+      (** == Isomorphisms == *)
+
       val intIso : (word, Int.int) iso
       val intXIso : (word, Int.int) iso
-      val largeIso : (word, LargeWord.word) iso
       val largeIntIso : (word, LargeInt.int) iso
       val largeIntXIso : (word, LargeInt.int) iso
+      val largeIso : (word, LargeWord.word) iso
       val largeXIso : (word, LargeWord.word) iso
       val wordIso : (word, Word.word) iso
-      val stringEmb : (word, string) emb
-      val isZero : word -> bool
+
+      (** == Predicates == *)
+
       val isEven : word -> bool
       val isOdd : word -> bool
-      val minWord : word
-      val maxWord : word
-      val bounds : word * word
+      val isZero : word -> bool
    end




More information about the MLton-commit mailing list