[MLton-commit] r6102

Vesa Karvonen vesak at mlton.org
Sun Oct 28 03:02:42 PST 2007


Changed RootGeneric to implement the CASES signature for simplicity.

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

U   mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
U   mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/with/generic.sml
U   mltonlib/trunk/com/ssh/unit-test/unstable/detail/generic.sml
U   mltonlib/trunk/com/ssh/unit-test/unstable/lib-with-default.cm

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -9,15 +9,11 @@
  *> Generate-combination.sh lib-with-default.mlb detail/generic.sml
  *)
 
-signature Generic = sig
-   structure Open : OPEN_CASES
-end
+signature Generic = CASES
 
 functor MkGeneric (Arg : Generic) : Generic = Arg
 
-structure Generic = struct
-   structure Open = RootGeneric
-end
+structure Generic = RootGeneric
 
 signature Generic = sig
    include Generic EQ
@@ -104,8 +100,6 @@
               open Generic Open)
 
 structure Generic = struct
-   structure Rep = ClosePrettyWithExtra
-     (open Generic
-      structure PrettyRep = Open.Rep)
+   structure Rep = ClosePrettyWithExtra (Generic)
    open Generic Rep
 end

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -4,62 +4,64 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-structure RootGeneric :> OPEN_CASES = struct
+structure RootGeneric :> CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)
 
-   structure Rep = struct
-      type ('a,     'x) t = 'x
-      type ('a,     'x) s = 'x
-      type ('a, 'k, 'x) p = 'x
+   structure Open = struct
+      structure Rep = struct
+         type ('a,     'x) t = 'x
+         type ('a,     'x) s = 'x
+         type ('a, 'k, 'x) p = 'x
 
-      val getT = id
-      val getS = id
-      val getP = id
+         val getT = id
+         val getS = id
+         val getP = id
 
-      val mapT = id
-      val mapS = id
-      val mapP = id
-   end
+         val mapT = id
+         val mapS = id
+         val mapP = id
+      end
 
-   val iso = id
-   val isoProduct = id
-   val isoSum = id
-   val op *` = id
-   val T = id
-   val R = id
-   val tuple = id
-   val record = id
-   val op +` = id
-   val C0 = id
-   val C1 = id
-   val data = id
-   val unit = id
-   val Y = id
-   val op --> = id
-   val exn = id
-   val regExn0 = id
-   val regExn1 = id
-   val array = id
-   val refc = id
-   val vector = id
-   val fixedInt = id
-   val largeInt = id
-   val largeReal = id
-   val largeWord = id
-   val word8 = id
-   val word32 = id
+      val iso = id
+      val isoProduct = id
+      val isoSum = id
+      val op *` = id
+      val T = id
+      val R = id
+      val tuple = id
+      val record = id
+      val op +` = id
+      val C0 = id
+      val C1 = id
+      val data = id
+      val unit = id
+      val Y = id
+      val op --> = id
+      val exn = id
+      val regExn0 = id
+      val regExn1 = id
+      val array = id
+      val refc = id
+      val vector = id
+      val fixedInt = id
+      val largeInt = id
+      val largeReal = id
+      val largeWord = id
+      val word8 = id
+      val word32 = id
 (*
-   val word64 = id
+      val word64 = id
 *)
-   val list = id
-   val bool = id
-   val char = id
-   val int = id
-   val real = id
-   val string = id
-   val word = id
+      val list = id
+      val bool = id
+      val char = id
+      val int = id
+      val real = id
+      val string = id
+      val word = id
 
-   val hole = id
+      val hole = id
+   end
 end

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -29,7 +29,7 @@
 signature TY = TY
 structure Ty : TY = Ty
 
-structure RootGeneric : OPEN_CASES = RootGeneric
+structure RootGeneric : CASES = RootGeneric
 
 (** == Framework Functors == *)
 

Modified: mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -9,15 +9,11 @@
  *> Generate-combination.sh test.mlb test/generic.sml
  *)
 
-signature Generic = sig
-   structure Open : OPEN_CASES
-end
+signature Generic = CASES
 
 functor MkGeneric (Arg : Generic) : Generic = Arg
 
-structure Generic = struct
-   structure Open = RootGeneric
-end
+structure Generic = RootGeneric
 
 signature Generic = sig
    include Generic TYPE_INFO

Modified: mltonlib/trunk/com/ssh/generic/unstable/with/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/with/generic.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/generic/unstable/with/generic.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -4,12 +4,8 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-signature Generic = sig
-   structure Open : OPEN_CASES
-end
+signature Generic = CASES
 
 functor MkGeneric (Arg : Generic) : Generic = Arg
 
-structure Generic = struct
-   structure Open = RootGeneric
-end
+structure Generic = RootGeneric

Modified: mltonlib/trunk/com/ssh/unit-test/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/unit-test/unstable/detail/generic.sml	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/unit-test/unstable/detail/generic.sml	2007-10-28 11:02:40 UTC (rev 6102)
@@ -54,8 +54,8 @@
               open Generic Open)
 
 structure Generic = struct
-   structure Rep = ClosePrettyWithExtra
-     (open Generic
-      structure PrettyRep = Open.Rep)
+   structure Rep = ClosePrettyWithExtra (Generic)
    open Generic Rep
 end
+
+structure UnitTest = MkUnitTest (Generic)

Modified: mltonlib/trunk/com/ssh/unit-test/unstable/lib-with-default.cm
===================================================================
--- mltonlib/trunk/com/ssh/unit-test/unstable/lib-with-default.cm	2007-10-27 19:56:18 UTC (rev 6101)
+++ mltonlib/trunk/com/ssh/unit-test/unstable/lib-with-default.cm	2007-10-28 11:02:40 UTC (rev 6102)
@@ -13,4 +13,3 @@
    ../../random/unstable/lib.cm
    detail/generic.sml
    lib.cm
-   with/unit-test.sml




More information about the MLton-commit mailing list