[MLton-commit] r6096

Vesa Karvonen vesak at mlton.org
Fri Oct 26 05:02:07 PDT 2007


Specify full combination of generics in test.mlb (and the generated
test/generic.sml).  This was prompted by MLKit, which currently disallows
multiple use of a single file.

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

U   mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/test.cm
U   mltonlib/trunk/com/ssh/generic/unstable/test.mlb

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-10-26 11:58:57 UTC (rev 6095)
+++ mltonlib/trunk/com/ssh/generic/unstable/test/generic.sml	2007-10-26 12:02:06 UTC (rev 6096)
@@ -10,6 +10,86 @@
  *)
 
 signature Generic = sig
+   structure Open : OPEN_CASES
+end
+
+functor MkGeneric (Arg : Generic) : Generic = Arg
+
+structure Generic = struct
+   structure Open = RootGeneric
+end
+
+signature Generic = sig
+   include Generic TYPE_INFO
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure TypeInfoRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithTypeInfo (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic TYPE_HASH
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure TypeHashRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithTypeHash (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic HASH
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure HashRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithHash (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic PRETTY
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure PrettyRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithPretty (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic EQ
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure EqRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithEq (Generic)
+              open Generic Open)
+
+signature Generic = sig
    include Generic DATA_REC_INFO
 end
 
@@ -107,11 +187,69 @@
    MkGeneric (structure Open = WithFmap (Generic)
               open Generic Open)
 
+signature Generic = sig
+   include Generic ARBITRARY
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure ArbitraryRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open =
+                 WithArbitrary (open Generic
+                                structure RandomGen = RanQD1Gen)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic SIZE
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure SizeRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithSize (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic ORD
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure OrdRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithOrd (Generic)
+              open Generic Open)
+
+signature Generic = sig
+   include Generic SHRINK
+end
+
+functor MkGeneric (Arg : Generic) = struct
+   structure Open = MkGeneric (Arg)
+   open Arg Open
+   structure ShrinkRep = Open.Rep
+end
+
+structure Generic =
+   MkGeneric (structure Open = WithShrink (Generic)
+              open Generic Open)
+
 structure Generic = struct
-   structure Rep = ClosePrettyWithExtra
-     (open Generic
-      structure PrettyRep = Open.Rep)
+   structure Rep = ClosePrettyWithExtra (Generic)
    open Generic Rep
 end
 
 local structure ? = RegBasisExns (Generic) open ? in end
+
+structure UnitTest = MkUnitTest (Generic)

Modified: mltonlib/trunk/com/ssh/generic/unstable/test.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test.cm	2007-10-26 11:58:57 UTC (rev 6095)
+++ mltonlib/trunk/com/ssh/generic/unstable/test.cm	2007-10-26 12:02:06 UTC (rev 6096)
@@ -7,13 +7,15 @@
 group
    library(../../extended-basis/unstable/basis.cm)
    library(../../prettier/unstable/lib.cm)
-   library(../../unit-test/unstable/lib-with-default.cm)
+   library(../../random/unstable/lib.cm)
+   library(../../unit-test/unstable/lib.cm)
    library(lib.cm)
    source(-)
 is
    ../../extended-basis/unstable/basis.cm
    ../../prettier/unstable/lib.cm
-   ../../unit-test/unstable/lib-with-default.cm
+   ../../random/unstable/lib.cm
+   ../../unit-test/unstable/lib.cm
    lib.cm
    test/generic.sml
    test/utils.fun

Modified: mltonlib/trunk/com/ssh/generic/unstable/test.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/test.mlb	2007-10-26 11:58:57 UTC (rev 6095)
+++ mltonlib/trunk/com/ssh/generic/unstable/test.mlb	2007-10-26 12:02:06 UTC (rev 6096)
@@ -7,7 +7,8 @@
 local
    $(MLTON_LIB)/com/ssh/extended-basis/unstable/basis.mlb
    $(MLTON_LIB)/com/ssh/prettier/unstable/lib.mlb
-   $(MLTON_LIB)/com/ssh/unit-test/unstable/lib-with-default.mlb
+   $(MLTON_LIB)/com/ssh/random/unstable/lib.mlb
+   $(MLTON_LIB)/com/ssh/unit-test/unstable/lib.mlb
    lib.mlb
 
    ann
@@ -16,6 +17,12 @@
       "warnUnused true"
    in
       local
+         with/generic.sml
+         with/type-info.sml
+         with/type-hash.sml
+         with/hash.sml
+         with/pretty.sml
+         with/eq.sml
          with/data-rec-info.sml
          with/some.sml
          with/pickle.sml
@@ -23,9 +30,15 @@
          with/reduce.sml
          with/transform.sml
          with/fmap.sml
+         with/arbitrary.sml
+         with/size.sml
+         with/ord.sml
+         with/shrink.sml
          with/close-pretty-with-extra.sml
          with/reg-basis-exns.sml
 
+         ../../unit-test/unstable/with/unit-test.sml
+
          test/utils.fun
       in
          test/fmap.sml




More information about the MLton-commit mailing list