[MLton-commit] r5599

Vesa Karvonen vesak at mlton.org
Fri Jun 8 05:18:32 PDT 2007


Corrected type distinctions.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml
U   mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/type-info.sig

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml	2007-06-07 18:51:39 UTC (rev 5598)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml	2007-06-08 12:18:31 UTC (rev 5599)
@@ -20,6 +20,8 @@
    infixr 0 -->
    (* SML/NJ workaround --> *)
 
+   (* XXX separate datatype for sums, products, and whole indices *)
+
    datatype u =
       IN of {alts : Int.t,
              base : Bool.t,
@@ -157,9 +159,10 @@
    structure TypeInfo = Index
    fun mk f = f o Outer.Index.getT
    val canBeCyclic        = fn ? => mk canBeCyclic        ?
-   val hasBaseCase        = fn ? => mk hasBaseCase        ?
    val hasExn             = fn ? => mk hasExn             ?
    val hasRecData         = fn ? => mk hasRecData         ?
    val isRefOrArray       = fn ? => mk isRefOrArray       ?
+   fun mk f = f o Outer.Index.getS
+   val hasBaseCase        = fn ? => mk hasBaseCase        ?
    val numConsecutiveAlts = fn ? => mk numConsecutiveAlts ?
 end

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig	2007-06-07 18:51:39 UTC (rev 5598)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig	2007-06-08 12:18:31 UTC (rev 5599)
@@ -10,8 +10,8 @@
    val mapT : 'x UnOp.t -> ('a, 'x) t UnOp.t
 
    type ('a, 'x) s
-   val getS : ('a, 'x) t -> 'x
-   val mapS : 'x UnOp.t -> ('a, 'x) t UnOp.t
+   val getS : ('a, 'x) s -> 'x
+   val mapS : 'x UnOp.t -> ('a, 'x) s UnOp.t
 
    type ('a, 'k, 'x) p
    val getP : ('a, 'k, 'x) p -> 'x

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/value/type-info.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/value/type-info.sig	2007-06-07 18:51:39 UTC (rev 5598)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/value/type-info.sig	2007-06-08 12:18:31 UTC (rev 5599)
@@ -29,7 +29,7 @@
     * Note: Functions are not considered to form cycles.
     *)
 
-   val hasBaseCase : ('a, 'x) TypeInfo.t UnPr.t
+   val hasBaseCase : ('a, 'x) TypeInfo.s UnPr.t
    (** Returns true iff the type {'a} has a non-recursive variant. *)
 
    val hasExn : ('a, 'x) TypeInfo.t UnPr.t
@@ -47,7 +47,7 @@
     * the form {'b ref}.
     *)
 
-   val numConsecutiveAlts : ('a, 'x) TypeInfo.t -> Int.t
+   val numConsecutiveAlts : ('a, 'x) TypeInfo.s -> Int.t
    (**
     * Number of consecutive alternatives.
     *)




More information about the MLton-commit mailing list