[MLton-commit] r5834

Vesa Karvonen vesak at mlton.org
Wed Aug 8 01:35:41 PDT 2007


Renamed several signatures, structures, and functors in the generic
library for brevity and, more importantly, for improved clarity.

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

U   mltonlib/trunk/com/ssh/generic/unstable/detail/close-generic.fun
U   mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun
U   mltonlib/trunk/com/ssh/generic/unstable/detail/layer-generic.fun
U   mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
U   mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/arbitrary.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/data-rec-info.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/debug.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/dynamic.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/eq.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/hash.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/ord.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/reduce.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/some.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/transform.sml
U   mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml
U   mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
A   mltonlib/trunk/com/ssh/generic/unstable/public/closed-cases.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/closed-rep.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
U   mltonlib/trunk/com/ssh/generic/unstable/public/generic.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/layer-cases-fun.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-cases-fun.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/layer-rep-fun.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/layered-rep.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/open-cases.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/open-generic-rep.sig
D   mltonlib/trunk/com/ssh/generic/unstable/public/open-generic.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/open-rep.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/arbitrary.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/data-rec-info.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/dynamic.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/eq.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/hash.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/ord.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/pickle.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/pretty.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/reduce.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/some.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/transform.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/value/type-info.sig
U   mltonlib/trunk/com/ssh/unit-test/unstable/public/unit-test.sig

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/close-generic.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/close-generic.fun	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/close-generic.fun	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,8 +4,8 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor CloseGenericRep (Arg : OPEN_GENERIC_REP) :>
-   CLOSED_GENERIC_REP
+functor CloseRep (Arg : OPEN_REP) :>
+   CLOSED_REP
       where type  'a      t = ('a,     Unit.t) Arg.t
       where type  'a      s = ('a,     Unit.t) Arg.s
       where type ('a, 'k) p = ('a, 'k, Unit.t) Arg.p =
@@ -15,8 +15,8 @@
    type ('a, 'k) p = ('a, 'k, Unit.t) Arg.p
 end
 
-functor CloseGeneric (Arg : OPEN_GENERIC) :>
-   CLOSED_GENERIC
+functor CloseCases (Arg : OPEN_CASES) :>
+   CLOSED_CASES
       where type  'a      Rep.t = ('a,     Unit.t) Arg.Rep.t
       where type  'a      Rep.s = ('a,     Unit.t) Arg.Rep.s
       where type ('a, 'k) Rep.p = ('a, 'k, Unit.t) Arg.Rep.p =
@@ -25,7 +25,7 @@
    open TopLevel
    (* SML/NJ workaround --> *)
 
-   structure Rep = CloseGenericRep (Arg.Rep)
+   structure Rep = CloseRep (Arg.Rep)
 
    fun morph m = m (const ignore)
 

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -10,21 +10,24 @@
       where type Con.t = Generics.Con.t
       where type Record.t = Generics.Record.t
       where type Tuple.t = Generics.Tuple.t
-   include ARBITRARY sharing Open.Rep = Arbitrary
-   include EQ        sharing Open.Rep = Eq
-   include HASH      sharing Open.Rep = Hash
-   include ORD       sharing Open.Rep = Ord
-   include PRETTY    sharing Open.Rep = Pretty
-   include SOME      sharing Open.Rep = Some
-   include TYPE_INFO sharing Open.Rep = TypeInfo
+   include ARBITRARY     sharing Open.Rep = Arbitrary
+   include DATA_REC_INFO sharing Open.Rep = DataRecInfo
+   include EQ            sharing Open.Rep = Eq
+   include HASH          sharing Open.Rep = Hash
+   include ORD           sharing Open.Rep = Ord
+   include PICKLE        sharing Open.Rep = Pickle
+   include PRETTY        sharing Open.Rep = Pretty
+   include SOME          sharing Open.Rep = Some
+   include TYPE_INFO     sharing Open.Rep = TypeInfo
 end = struct
    structure Open = RootGeneric
 
    (* Add generics not depending on any other generic: *)
-   structure Open = WithEq          (Open) open Open
+   structure Open = WithEq          (Open) open Open structure Eq=Open
    structure Open = WithOrd         (Open) open Open
    structure Open = WithPretty      (Open) open Open
    structure Open = WithTypeInfo    (Open) open Open structure TypeInfo=Open
+   structure Open = WithDataRecInfo (Open) open Open structure DataRecInfo=Open
 
    (* Add generics depending on other generics: *)
    structure Open = struct
@@ -38,27 +41,35 @@
       open TypeInfo Open
       structure TypeInfo = Rep
    end
-   structure Open = WithHash        (Open) open Open
+   structure Open = WithHash        (Open) open Open structure Hash=Open
 
    structure Open = struct
       open TypeInfo Open
       structure TypeInfo = Rep
    end
-   structure Open = WithSome        (Open) open Open
+   structure Open = WithSome        (Open) open Open structure Some=Open
 
+   structure Open = struct
+      open Eq Hash TypeInfo DataRecInfo Some
+      structure Eq=Rep and Hash=Rep and TypeInfo=Rep and DataRecInfo=Rep
+   end
+   structure Open = WithPickle      (Open) open Open
+
    (* Make type representations equal: *)
    structure Arbitrary   = Rep
    structure Eq          = Rep
    structure Hash        = Rep
    structure Ord         = Rep
+   structure Pickle      = Rep
    structure Pretty      = Rep
    structure Some        = Rep
    structure TypeInfo    = Rep
+   structure DataRecInfo = Rep
 
    (* Close the combination for use: *)
    structure Generic = struct
       structure Open = Open
-      structure Closed = CloseGeneric (Open)
+      structure Closed = CloseCases (Open)
       open Closed
    end
 

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generics-util.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -15,7 +15,7 @@
    fun failExnSq (l, r) = failCat ["unregistered exns ", `l, " and ", `r]
 end
 
-functor MkClosedRep (type 'a t) : CLOSED_GENERIC_REP = struct
+functor MkClosedRep (type 'a t) : CLOSED_REP = struct
    type  'a      t = 'a t
    type  'a      s = 'a t
    type ('a, 'k) p = 'a t

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,33 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-signature JOIN_GENERIC_REPS_DOM = sig
-   structure Outer : OPEN_GENERIC_REP
-   structure Inner : OPEN_GENERIC_REP
-end
-
-functor JoinGenericReps (Arg : JOIN_GENERIC_REPS_DOM) :>
-   OPEN_GENERIC_REP
-      where type ('a,   'x) t = ('a,   ('a,   'x) Arg.Inner.t) Arg.Outer.t
-      where type ('a,   'x) s = ('a,   ('a,   'x) Arg.Inner.s) Arg.Outer.s
-      where type ('a,'k,'x) p = ('a,'k,('a,'k,'x) Arg.Inner.p) Arg.Outer.p =
-struct
-   open Arg
-
-   type ('a,     'x) t = ('a,     ('a,     'x) Inner.t) Outer.t
-   type ('a,     'x) s = ('a,     ('a,     'x) Inner.s) Outer.s
-   type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k, 'x) Inner.p) Outer.p
-
-   fun getT ? = Inner.getT (Outer.getT ?)
-   fun getS ? = Inner.getS (Outer.getS ?)
-   fun getP ? = Inner.getP (Outer.getP ?)
-
-   fun mapT ? = Outer.mapT (Inner.mapT ?)
-   fun mapS ? = Outer.mapS (Inner.mapS ?)
-   fun mapP ? = Outer.mapP (Inner.mapP ?)
-end
-
-functor JoinGenerics (Arg : JOIN_GENERICS_DOM) :>
+functor JoinCases (Arg : JOIN_CASES_DOM) :>
    OPEN_GENERIC
       where type ('a,   'x) Rep.t = ('a,   ('a,   'x) Arg.Inner.Rep.t) Arg.Outer.Rep.t
       where type ('a,   'x) Rep.s = ('a,   ('a,   'x) Arg.Inner.Rep.s) Arg.Outer.Rep.s

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/layer-generic.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/layer-generic.fun	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/layer-generic.fun	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,8 +4,34 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor LayerGenericRep (Arg : LAYER_GENERIC_REP_DOM) :>
-   LAYERED_GENERIC_REP
+signature JOIN_REPS_DOM = sig
+   structure Outer : OPEN_REP
+   structure Inner : OPEN_REP
+end
+
+functor JoinReps (Arg : JOIN_REPS_DOM) :>
+   OPEN_REP
+      where type ('a,   'x) t = ('a,   ('a,   'x) Arg.Inner.t) Arg.Outer.t
+      where type ('a,   'x) s = ('a,   ('a,   'x) Arg.Inner.s) Arg.Outer.s
+      where type ('a,'k,'x) p = ('a,'k,('a,'k,'x) Arg.Inner.p) Arg.Outer.p =
+struct
+   open Arg
+
+   type ('a,     'x) t = ('a,     ('a,     'x) Inner.t) Outer.t
+   type ('a,     'x) s = ('a,     ('a,     'x) Inner.s) Outer.s
+   type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k, 'x) Inner.p) Outer.p
+
+   fun getT ? = Inner.getT (Outer.getT ?)
+   fun getS ? = Inner.getS (Outer.getS ?)
+   fun getP ? = Inner.getP (Outer.getP ?)
+
+   fun mapT ? = Outer.mapT (Inner.mapT ?)
+   fun mapS ? = Outer.mapS (Inner.mapS ?)
+   fun mapP ? = Outer.mapP (Inner.mapP ?)
+end
+
+functor LayerRep (Arg : LAYER_REP_DOM) :>
+   LAYERED_REP
       where type  'a      Closed.t =  'a      Arg.Closed.t
       where type  'a      Closed.s =  'a      Arg.Closed.s
       where type ('a, 'k) Closed.p = ('a, 'k) Arg.Closed.p
@@ -30,7 +56,7 @@
       val mapS = Pair.mapSnd
       val mapP = Pair.mapSnd
    end
-   structure Result = JoinGenericReps (structure Outer=Outer and Inner=Inner)
+   structure Result = JoinReps (structure Outer=Outer and Inner=Inner)
    open Result
    structure This = struct
       fun getT ? = Pair.fst (Outer.getT ?)
@@ -42,8 +68,8 @@
    end
 end
 
-functor LayerDepGeneric (Arg : LAYER_DEP_GENERIC_DOM) :>
-   OPEN_GENERIC
+functor LayerDepCases (Arg : LAYER_DEP_CASES_DOM) :>
+   OPEN_CASES
       where type ('a,     'x) Rep.t = ('a,     'x) Arg.Result.t
       where type ('a,     'x) Rep.s = ('a,     'x) Arg.Result.s
       where type ('a, 'k, 'x) Rep.p = ('a, 'k, 'x) Arg.Result.p =
@@ -109,12 +135,12 @@
    fun word ? = op0t Outer.word Arg.word ?
 end
 
-functor LayerGeneric (Arg : LAYER_GENERIC_DOM) :>
-   OPEN_GENERIC
+functor LayerCases (Arg : LAYER_CASES_DOM) :>
+   OPEN_CASES
       where type ('a,     'x) Rep.t = ('a,     'x) Arg.Result.t
       where type ('a,     'x) Rep.s = ('a,     'x) Arg.Result.s
       where type ('a, 'k, 'x) Rep.p = ('a, 'k, 'x) Arg.Result.p =
-   LayerDepGeneric
+   LayerDepCases
      (open Arg Arg.Result.This
       fun iso b = Arg.iso (getT b)
       fun isoProduct b = Arg.isoProduct (getP b)

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-08-08 08:35:36 UTC (rev 5834)
@@ -8,19 +8,18 @@
    ../../../../../extended-basis/unstable/basis.cm
    ../../../../../prettier/unstable/lib.cm
    ../../../../../random/unstable/lib.cm
-   ../../../public/closed-generic-rep.sig
-   ../../../public/closed-generic.sig
+   ../../../public/closed-cases.sig
+   ../../../public/closed-rep.sig
    ../../../public/generic-extra.sig
    ../../../public/generic.sig
    ../../../public/generics-util.sig
    ../../../public/generics.sig
-   ../../../public/join-generics-fun.sig
-   ../../../public/layer-dep-generic-fun.sig
-   ../../../public/layer-generic-fun.sig
-   ../../../public/layer-generic-rep-fun.sig
-   ../../../public/layered-generic-rep.sig
-   ../../../public/open-generic-rep.sig
-   ../../../public/open-generic.sig
+   ../../../public/layer-cases-fun.sig
+   ../../../public/layer-dep-cases-fun.sig
+   ../../../public/layer-rep-fun.sig
+   ../../../public/layered-rep.sig
+   ../../../public/open-cases.sig
+   ../../../public/open-rep.sig
    ../../../public/value/arbitrary.sig
    ../../../public/value/data-rec-info.sig
    ../../../public/value/dynamic.sig

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/root-generic.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-structure RootGeneric :> OPEN_GENERIC = struct
+structure RootGeneric :> OPEN_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/arbitrary.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/arbitrary.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/arbitrary.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithArbitrary (Arg : WITH_ARBITRARY_DOM) : ARBITRARY_GENERIC = struct
+functor WithArbitrary (Arg : WITH_ARBITRARY_DOM) : ARBITRARY_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  7 *`
@@ -29,9 +29,9 @@
    datatype 'a t = IN of {gen : 'a G.t, cog : 'a -> Univ.t G.t UnOp.t}
    fun out (IN r) = r
 
-   structure Arbitrary =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = MkClosedRep (type 'a t = 'a t))
+   structure Arbitrary = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (type 'a t = 'a t))
 
    open Arbitrary.This
 
@@ -41,7 +41,7 @@
    fun arbitrary ? = #gen (out (getT ?))
    fun withGen gen = mapT (fn IN {cog, ...} => IN {gen = gen, cog = cog})
 
-   structure Layered = LayerDepGeneric
+   structure Layered = LayerDepCases
      (structure Outer = Arg and Result = Arbitrary
 
       fun iso' (IN {gen, cog}) (a2b, b2a) =

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/data-rec-info.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/data-rec-info.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/data-rec-info.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithDataRecInfo (Arg : OPEN_GENERIC) : DATA_REC_INFO_GENERIC = struct
+functor WithDataRecInfo (Arg : OPEN_CASES) : DATA_REC_INFO_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  2 andAlso
@@ -34,14 +34,13 @@
    fun mutable (INT {exn, recs, ...}) =
        INT {exn = exn, pure = false, recs = recs}
 
-   structure DataRecInfo =
-      LayerGenericRep
-        (structure Outer = Arg.Rep
-         structure Closed = struct
-            type  'a      t = t
-            type  'a      s = s
-            type ('a, 'k) p = p
-         end)
+   structure DataRecInfo = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = struct
+         type  'a      t = t
+         type  'a      s = s
+         type ('a, 'k) p = p
+      end)
 
    open DataRecInfo.This
 
@@ -53,7 +52,7 @@
    fun mayBeCyclic   ? =
        (isMutableType andAlso (mayContainExn orElse mayBeRecData)) ?
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer=Arg and Result=DataRecInfo and Rep=DataRecInfo.Closed
 
       val iso        = const

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/debug.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/debug.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/debug.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithDebug (Arg : OPEN_GENERIC) : OPEN_GENERIC = struct
+functor WithDebug (Arg : OPEN_CASES) : OPEN_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)
@@ -20,15 +20,15 @@
 
    fun addN kind (xs, ys) = foldl (add1 kind) xs ys
 
-   structure Check =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = struct
-                          type 'a t = Unit.t
-                          type 'a s = String.t List.t
-                          type ('a, 'k) p = String.t List.t
-                       end)
+   structure Check = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = struct
+         type 'a t = Unit.t
+         type 'a s = String.t List.t
+         type ('a, 'k) p = String.t List.t
+      end)
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Check and Rep = Check.Closed
 
       val iso        = const

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/dynamic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/dynamic.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/dynamic.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithDynamic (Arg : OPEN_GENERIC) : DYNAMIC_GENERIC = struct
+functor WithDynamic (Arg : OPEN_CASES) : DYNAMIC_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix <-->
@@ -40,17 +40,16 @@
 
    fun isoUnsupported text = (failing text, failing text)
 
-   structure Dynamic =
-      LayerGenericRep
-         (structure Outer = Arg.Rep
-          structure Closed = MkClosedRep (type 'a t = ('a, t) Iso.t))
+   structure Dynamic = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (type 'a t = ('a, t) Iso.t))
 
    open Dynamic.This
 
    fun toDyn t = Iso.to (getT t)
    fun fromDyn t d = SOME (Iso.from (getT t) d) handle Dyn.Dyn => NONE
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Dynamic and Rep = Dynamic.Closed
 
       fun iso bId aIb = bId <--> aIb

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/eq.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/eq.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/eq.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithEq (Arg : OPEN_GENERIC) : EQ_GENERIC = struct
+functor WithEq (Arg : OPEN_CASES) : EQ_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  0 &
@@ -23,9 +23,9 @@
       lL = lR andalso lp lL
    end
 
-   structure Eq =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = MkClosedRep (BinPr))
+   structure Eq = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (BinPr))
 
    open Eq.This
 
@@ -33,7 +33,7 @@
    fun notEq t = not o eq t
    fun withEq eq = mapT (const eq)
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Eq and Rep = Eq.Closed
 
       fun iso b (a2b, _) = BinPr.map a2b b

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/hash.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/hash.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/hash.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithHash (Arg : WITH_HASH_DOM) : HASH_GENERIC = struct
+functor WithHash (Arg : WITH_HASH_DOM) : HASH_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  0 &
@@ -19,9 +19,9 @@
 
    fun iso' bH (a2b, _) = bH o a2b
 
-   structure Hash =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = MkClosedRep (type 'a t = 'a t))
+   structure Hash = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (type 'a t = 'a t))
 
    open Hash.This
 
@@ -32,7 +32,7 @@
 
    fun hash t = hashParam t {totWidth = 200, maxDepth = 10}
 
-   structure Layered = LayerDepGeneric
+   structure Layered = LayerDepCases
      (structure Outer = Arg and Result = Hash
 
       fun iso        ? = iso' (getT ?)

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/ord.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/ord.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/ord.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,22 +4,22 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithOrd (Arg : OPEN_GENERIC) : ORD_GENERIC = struct
+functor WithOrd (Arg : OPEN_CASES) : ORD_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix 0 &
    (* SML/NJ workaround --> *)
 
-   structure Ord =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = MkClosedRep (Cmp))
+   structure Ord = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (Cmp))
 
    open Ord.This
 
    val ord = getT
    fun withOrd cmp = mapT (const cmp)
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Ord and Rep = Ord.Closed
 
       fun iso b (a2b, _) = Cmp.map a2b b

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,9 +4,58 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_GENERIC = struct
+structure Pos : INTEGER = Int
+
+structure Istream :> sig
+   type t
+   val run : ('a, t) Reader.t -> (Char.t, 'b) Reader.t -> ('a, 'b) Reader.t
+   val read : (Char.t, t) Reader.t
+   val pos : t -> Pos.t
+end = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
+   (* SML/NJ workaround --> *)
+
+   datatype t = T of {st : Univ.t, rd : (Char.t, Univ.t) Reader.t, ps : Pos.t}
+   fun run f cr = let
+      val (to, from) = Univ.Iso.new ()
+   in
+      Reader.mapState (fn s => T {st = to s,
+                                  rd = Reader.mapState (from, to) cr,
+                                  ps = 0},
+                       fn T {st, ...} => from st)
+                      f
+   end
+   fun read (T {st, rd, ps}) =
+       Option.map
+          (Pair.map (id, fn st => T {st = st, rd = rd, ps = ps + 1}))
+          (rd st)
+   fun pos (T r) = #ps r
+end
+
+structure Ostream :> sig
+   type t
+   val run : ('a, t) Writer.t -> (Char.t, 'b) Writer.t -> ('a, 'b) Writer.t
+   val write : (Char.t, t) Writer.t
+   val pos : t -> Pos.t
+end = struct
+   datatype t = T of {st : Univ.t, wr : (Char.t, Univ.t) Writer.t, ps : Pos.t}
+   fun run f cw = let
+      val (to, from) = Univ.Iso.new ()
+   in
+      Writer.mapState (fn s => T {st = to s,
+                                  wr = Writer.mapState (from, to) cw,
+                                  ps = 0},
+                       fn T {st, ...} => from st)
+                      f
+   end
+   fun write (c, T r) = T {st = #wr r (c, #st r), wr = #wr r, ps = #ps r + 1}
+   fun pos (T r) = #ps r
+end
+
+functor WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_CASES = struct
+   (* <-- SML/NJ workaround *)
+   open TopLevel
    infix  7 *`
    infix  6 +`
    infix  4 <\ \>
@@ -18,8 +67,83 @@
    infixr 0 -->
    (* SML/NJ workaround --> *)
 
-   open Arg
-   structure Pickle = Rep
-   val pickle = undefined
-   val unpickle = undefined
+   datatype 'a t =
+      INT of {rd : ('a, {st : Istream.t}) Reader.t,
+              wr : ('a, {st : Ostream.t}) Writer.t}
+   type 'a s = Int.t -> 'a t
+
+   structure Pickle = LayerRep
+      (structure Outer = Arg.Rep
+       structure Closed = struct
+          type  'a      t = 'a t
+          type  'a      s = 'a s
+          type ('a, 'k) p = 'a t
+       end)
+
+   open Pickle.This
+
+   fun pickle t =
+       case getT t
+        of INT {wr, ...} =>
+           Ostream.run (Writer.mapState (fn s => {st = s}, #st) wr)
+   fun unpickle t =
+       case getT t
+        of INT {rd, ...} =>
+           Istream.run (Reader.mapState (fn s => {st = s}, #st) rd)
+
+   val unsupported = INT {rd = fn _ => fail "Unsupported",
+                          wr = fn _ => fail "Unsupported"}
+
+   structure Layered = LayerDepCases
+     (structure Outer = Arg and Result = Pickle
+
+      fun iso        _ _ = unsupported
+      fun isoProduct _ _ = unsupported
+      fun isoSum     _ _ _ = unsupported
+
+      fun op *` _ = unsupported
+      val T   = getT
+      fun R _ = getT
+      fun tuple  _ = unsupported
+      fun record _ = unsupported
+
+      fun op +` _ _ = unsupported
+      val unit = unsupported
+      fun C0 _ _ = unsupported
+      fun C1 _ _ _ = unsupported
+      fun data _ = unsupported
+
+      fun Y ? = let open Tie in iso (function *` function) end
+                   (fn INT {rd, wr} => rd & wr, fn r & w => INT {rd=r, wr=w}) ?
+
+      fun op --> _ = unsupported
+
+      fun refc _ = unsupported
+
+      val int = unsupported
+
+      fun list _ = unsupported
+
+      fun array  _ = unsupported
+      fun vector _ = unsupported
+
+      val char = unsupported
+      val string = unsupported
+
+      val exn = unsupported
+      fun regExn _ _ = ()
+
+      val bool = unsupported
+      val real = unsupported
+      val word = unsupported
+
+      val largeInt  = unsupported
+      val largeReal = unsupported
+      val largeWord = unsupported
+
+      val word8  = unsupported
+      val word32 = unsupported
+      val word64 = unsupported)
+
+   open Layered
 end

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/pretty.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -9,7 +9,7 @@
 (* XXX parameters for pretty printing? *)
 (* XXX parameters for depth, length, etc... for showing only partial data *)
 
-functor WithPretty (Arg : OPEN_GENERIC) : PRETTY_GENERIC = struct
+functor WithPretty (Arg : OPEN_CASES) : PRETTY_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  7 *`
@@ -56,17 +56,16 @@
       val op </> = bop op </>
    end
 
-   structure Pretty =
-      LayerGenericRep
-         (structure Outer = Arg.Rep
-          structure Closed = MkClosedRep (type 'a t = exn list * 'a -> u))
+   structure Pretty = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (type 'a t = exn list * 'a -> u))
 
    open Pretty.This
 
    fun layout t = Pair.snd o [] <\ getT t
    fun pretty m t = Prettier.pretty m o layout t
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Pretty and Rep = Pretty.Closed
 
       local

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/reduce.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/reduce.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/reduce.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithReduce (Arg : OPEN_GENERIC) : REDUCE_GENERIC = struct
+functor WithReduce (Arg : OPEN_CASES) : REDUCE_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    infix  0 &
@@ -18,7 +18,7 @@
        
    fun default {zero, + = _} = const zero
 
-   structure Reduce = LayerGenericRep
+   structure Reduce = LayerRep
      (structure Outer = Arg.Rep
       structure Closed = MkClosedRep
         (type 'a t = {zero : Univ.t, + : Univ.t BinOp.t} -> 'a -> Univ.t))
@@ -32,7 +32,7 @@
       from o Reduce.This.getT tB c
    end
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Reduce and Rep = Reduce.Closed
 
       fun iso rB (a2b, _) c = rB c o a2b

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/some.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/some.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/some.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,14 +4,14 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithSome (Arg : WITH_SOME_DOM) : SOME_GENERIC = struct
+functor WithSome (Arg : WITH_SOME_DOM) : SOME_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)
 
-   structure Some =
-      LayerGenericRep (structure Outer = Arg.Rep
-                       structure Closed = MkClosedRep (Thunk))
+   structure Some = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = MkClosedRep (Thunk))
 
    open Some.This
 
@@ -21,7 +21,7 @@
    fun withNone ? = mapT (const (raising Option)) ?
    fun withSome v = mapT (const (const v))
 
-   structure Layered = LayerDepGeneric
+   structure Layered = LayerDepCases
      (structure Outer = Arg and Result = Some
 
       fun iso' b (_, b2a) = b2a o b

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/transform.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/transform.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/transform.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,12 +4,12 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithTransform (Arg : OPEN_GENERIC) : TRANSFORM_GENERIC = struct
+functor WithTransform (Arg : OPEN_CASES) : TRANSFORM_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)
 
-   structure Transform = LayerGenericRep
+   structure Transform = LayerRep
      (structure Outer = Arg.Rep
       structure Closed = MkClosedRep (UnOp))
 
@@ -20,7 +20,7 @@
       Transform.This.getT tB
    end
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = Transform and Rep = Transform.Closed
 
       fun iso rB aIb = Fn.map aIb rB

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/type-info.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -4,7 +4,7 @@
  * See the LICENSE file or http://mlton.org/License for details.
  *)
 
-functor WithTypeInfo (Arg : OPEN_GENERIC) : TYPE_INFO_GENERIC = struct
+functor WithTypeInfo (Arg : OPEN_CASES) : TYPE_INFO_CASES = struct
    (* <-- SML/NJ workaround *)
    open TopLevel
    (* SML/NJ workaround --> *)
@@ -16,14 +16,13 @@
    val base = INT {base = true}
    fun pure (INT {...}) = INT {base = true}
 
-   structure TypeInfo =
-      LayerGenericRep
-        (structure Outer = Arg.Rep
-         structure Closed = struct
-            type  'a      t = t
-            type  'a      s = s
-            type ('a, 'k) p = p
-         end)
+   structure TypeInfo = LayerRep
+     (structure Outer = Arg.Rep
+      structure Closed = struct
+         type  'a      t = t
+         type  'a      s = s
+         type ('a, 'k) p = p
+      end)
 
    open TypeInfo.This
 
@@ -35,7 +34,7 @@
 
    fun numElems     ? = (#elems o outP o getP) ?
 
-   structure Layered = LayerGeneric
+   structure Layered = LayerCases
      (structure Outer = Arg and Result = TypeInfo and Rep = TypeInfo.Closed
 
       val iso        = const

Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-08-08 08:35:36 UTC (rev 5834)
@@ -29,11 +29,11 @@
 
          (* Concepts *)
 
-         public/closed-generic-rep.sig
-         public/closed-generic.sig
+         public/closed-rep.sig
+         public/closed-cases.sig
 
-         public/open-generic-rep.sig
-         public/open-generic.sig
+         public/open-rep.sig
+         public/open-cases.sig
 
          public/generic.sig
          public/generic-extra.sig
@@ -51,13 +51,10 @@
 
          detail/close-generic.fun
 
-         public/join-generics-fun.sig
-         detail/join-generics.fun
-
-         public/layered-generic-rep.sig
-         public/layer-dep-generic-fun.sig
-         public/layer-generic-fun.sig
-         public/layer-generic-rep-fun.sig
+         public/layered-rep.sig
+         public/layer-dep-cases-fun.sig
+         public/layer-cases-fun.sig
+         public/layer-rep-fun.sig
          detail/layer-generic.fun
 
          (* Values *)

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/closed-cases.sig (from rev 5823, mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig	2007-08-05 12:15:49 UTC (rev 5823)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/closed-cases.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,126 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for closed generics.
+ *)
+signature CLOSED_CASES = sig
+   structure Rep : CLOSED_REP
+
+   (** == Support for User-Defined Types == *)
+
+   val iso : 'b Rep.t -> ('a, 'b) Iso.t -> 'a Rep.t
+   (**
+    * Given a representation {'b Rep.t} and an isomorphism between {'a}
+    * and {'b}, returns a representation {'a Rep.t}.  The purpose of {iso}
+    * is to support user-defined types.
+    *)
+
+   val isoProduct : ('b, 'k) Rep.p -> ('a, 'b) Iso.t -> ('a, 'k) Rep.p
+   (**
+    * Given a representation {('b, 'k) Rep.p} and an isomorphism between
+    * {'a} and {'b}, returns a representation {('a, 'k) Rep.p}.
+    *)
+
+   val isoSum : 'b Rep.s -> ('a, 'b) Iso.t -> 'a Rep.s
+   (**
+    * Given a representation {'b Rep.s} and an isomorphism between {'a}
+    * and {'b}, returns a representation {'a Rep.s}.
+    *)
+
+   (** == Support for Tuples and Records == *)
+
+   val *` : ('a, 'k) Rep.p * ('b, 'k) Rep.p -> (('a, 'b) Product.t, 'k) Rep.p
+   (**
+    * Given representations for fields of type {'a} and {'b} of the same
+    * kind {'k} (tuple or record), returns a representation for the
+    * product {('a, 'b) Product.t}.
+    *)
+
+   val T : 'a Rep.t -> ('a, Generics.Tuple.t) Rep.p
+   (** Specifies a field of a tuple. *)
+
+   val R : Generics.Label.t -> 'a Rep.t -> ('a, Generics.Record.t) Rep.p
+   (** Specifies a field of a record. *)
+
+   val tuple  : ('a, Generics.Tuple.t) Rep.p -> 'a Rep.t
+   (** Specifies a tuple. *)
+
+   val record : ('a, Generics.Record.t) Rep.p -> 'a Rep.t
+   (** Specifies a record. *)
+
+   (** == Support for Datatypes == *)
+
+   val +` : 'a Rep.s * 'b Rep.s -> (('a, 'b) Sum.t) Rep.s
+   (**
+    * Given representations for variants of type {'a} and {'b}, returns a
+    * representation for the sum {('a, 'b) Sum.t}.
+    *)
+
+   val C0 : Generics.Con.t -> Unit.t Rep.s
+   (** Specifies a nullary constructor. *)
+
+   val C1 : Generics.Con.t -> 'a Rep.t -> 'a Rep.s
+   (** Specifies a unary constructor. *)
+
+   val data : 'a Rep.s -> 'a Rep.t
+   (** Specifies a complete datatype. *)
+
+   val unit : Unit.t Rep.t
+   (**
+    * Representation for the {unit} type.  Using {unit} and {+} one can
+    * actually encode {bool}, {word}, and much more.
+    *)
+
+   val Y : 'a Rep.t Tie.t
+   (** Fixed-point tier to support recursive datatypes. *)
+
+   (** == Support for Functions == *)
+
+   val --> : 'a Rep.t * 'b Rep.t -> ('a -> 'b) Rep.t
+
+   (** == Support for Exceptions == *)
+
+   val exn : Exn.t Rep.t
+   (** Universal representation for exceptions. *)
+
+   val regExn : 'a Rep.s -> ('a, Exn.t) Emb.t Effect.t
+   (** Registers a handler for exceptions. *)
+
+   (** == Support for Types With Identity == *)
+
+   val array : 'a Rep.t -> 'a Array.t Rep.t
+   val refc : 'a Rep.t -> 'a Ref.t Rep.t
+
+   (** == Support for Functional Aggregate Types == *)
+
+   val vector : 'a Rep.t -> 'a Vector.t Rep.t
+
+   (** == Support for Arbitrary Integers, Words, And Reals == *)
+
+   val largeInt  : LargeInt.t  Rep.t
+   val largeReal : LargeReal.t Rep.t
+   val largeWord : LargeWord.t Rep.t
+
+   (** == Support for Binary Data == *)
+
+   val word8  : Word8.t  Rep.t
+   val word32 : Word32.t Rep.t
+   val word64 : Word64.t Rep.t
+
+   (** == Support for Some Built-In Type Constructors == *)
+
+   val list : 'a Rep.t -> 'a List.t Rep.t
+
+   (** == Support for Some Built-In Base Types == *)
+
+   val bool   : Bool.t   Rep.t
+   val char   : Char.t   Rep.t
+   val int    : Int.t    Rep.t
+   val real   : Real.t   Rep.t
+   val string : String.t Rep.t
+   val word   : Word.t   Rep.t
+end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,14 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the closed representation types of generics.
- *)
-signature CLOSED_GENERIC_REP = sig
-   type  'a      t   (** Type of complete representations. *)
-   type  'a      s   (** Type of incomplete sum representations. *)
-   type ('a, 'k) p   (** Type of incomplete product representations. *)
-end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,126 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for closed generics.
- *)
-signature CLOSED_GENERIC = sig
-   structure Rep : CLOSED_GENERIC_REP
-
-   (** == Support for User-Defined Types == *)
-
-   val iso : 'b Rep.t -> ('a, 'b) Iso.t -> 'a Rep.t
-   (**
-    * Given a representation {'b Rep.t} and an isomorphism between {'a}
-    * and {'b}, returns a representation {'a Rep.t}.  The purpose of {iso}
-    * is to support user-defined types.
-    *)
-
-   val isoProduct : ('b, 'k) Rep.p -> ('a, 'b) Iso.t -> ('a, 'k) Rep.p
-   (**
-    * Given a representation {('b, 'k) Rep.p} and an isomorphism between
-    * {'a} and {'b}, returns a representation {('a, 'k) Rep.p}.
-    *)
-
-   val isoSum : 'b Rep.s -> ('a, 'b) Iso.t -> 'a Rep.s
-   (**
-    * Given a representation {'b Rep.s} and an isomorphism between {'a}
-    * and {'b}, returns a representation {'a Rep.s}.
-    *)
-
-   (** == Support for Tuples and Records == *)
-
-   val *` : ('a, 'k) Rep.p * ('b, 'k) Rep.p -> (('a, 'b) Product.t, 'k) Rep.p
-   (**
-    * Given representations for fields of type {'a} and {'b} of the same
-    * kind {'k} (tuple or record), returns a representation for the
-    * product {('a, 'b) Product.t}.
-    *)
-
-   val T : 'a Rep.t -> ('a, Generics.Tuple.t) Rep.p
-   (** Specifies a field of a tuple. *)
-
-   val R : Generics.Label.t -> 'a Rep.t -> ('a, Generics.Record.t) Rep.p
-   (** Specifies a field of a record. *)
-
-   val tuple  : ('a, Generics.Tuple.t) Rep.p -> 'a Rep.t
-   (** Specifies a tuple. *)
-
-   val record : ('a, Generics.Record.t) Rep.p -> 'a Rep.t
-   (** Specifies a record. *)
-
-   (** == Support for Datatypes == *)
-
-   val +` : 'a Rep.s * 'b Rep.s -> (('a, 'b) Sum.t) Rep.s
-   (**
-    * Given representations for variants of type {'a} and {'b}, returns a
-    * representation for the sum {('a, 'b) Sum.t}.
-    *)
-
-   val C0 : Generics.Con.t -> Unit.t Rep.s
-   (** Specifies a nullary constructor. *)
-
-   val C1 : Generics.Con.t -> 'a Rep.t -> 'a Rep.s
-   (** Specifies a unary constructor. *)
-
-   val data : 'a Rep.s -> 'a Rep.t
-   (** Specifies a complete datatype. *)
-
-   val unit : Unit.t Rep.t
-   (**
-    * Representation for the {unit} type.  Using {unit} and {+} one can
-    * actually encode {bool}, {word}, and much more.
-    *)
-
-   val Y : 'a Rep.t Tie.t
-   (** Fixed-point tier to support recursive datatypes. *)
-
-   (** == Support for Functions == *)
-
-   val --> : 'a Rep.t * 'b Rep.t -> ('a -> 'b) Rep.t
-
-   (** == Support for Exceptions == *)
-
-   val exn : Exn.t Rep.t
-   (** Universal representation for exceptions. *)
-
-   val regExn : 'a Rep.s -> ('a, Exn.t) Emb.t Effect.t
-   (** Registers a handler for exceptions. *)
-
-   (** == Support for Types With Identity == *)
-
-   val array : 'a Rep.t -> 'a Array.t Rep.t
-   val refc : 'a Rep.t -> 'a Ref.t Rep.t
-
-   (** == Support for Functional Aggregate Types == *)
-
-   val vector : 'a Rep.t -> 'a Vector.t Rep.t
-
-   (** == Support for Arbitrary Integers, Words, And Reals == *)
-
-   val largeInt  : LargeInt.t  Rep.t
-   val largeReal : LargeReal.t Rep.t
-   val largeWord : LargeWord.t Rep.t
-
-   (** == Support for Binary Data == *)
-
-   val word8  : Word8.t  Rep.t
-   val word32 : Word32.t Rep.t
-   val word64 : Word64.t Rep.t
-
-   (** == Support for Some Built-In Type Constructors == *)
-
-   val list : 'a Rep.t -> 'a List.t Rep.t
-
-   (** == Support for Some Built-In Base Types == *)
-
-   val bool   : Bool.t   Rep.t
-   val char   : Char.t   Rep.t
-   val int    : Int.t    Rep.t
-   val real   : Real.t   Rep.t
-   val string : String.t Rep.t
-   val word   : Word.t   Rep.t
-end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/closed-rep.sig (from rev 5753, mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/closed-generic-rep.sig	2007-07-10 07:39:05 UTC (rev 5753)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/closed-rep.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,14 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for the closed representation types of generics.
+ *)
+signature CLOSED_REP = sig
+   type  'a      t   (** Type of complete representations. *)
+   type  'a      s   (** Type of incomplete sum representations. *)
+   type ('a, 'k) p   (** Type of incomplete product representations. *)
+end

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-08-08 08:35:36 UTC (rev 5834)
@@ -10,13 +10,13 @@
 
 signature GENERICS_UTIL = GENERICS_UTIL
 
-signature CLOSED_GENERIC = CLOSED_GENERIC
-signature CLOSED_GENERIC_REP = CLOSED_GENERIC_REP
+signature CLOSED_CASES = CLOSED_CASES
+signature CLOSED_REP = CLOSED_REP
 
-signature OPEN_GENERIC = OPEN_GENERIC
-signature OPEN_GENERIC_REP = OPEN_GENERIC_REP
+signature OPEN_CASES = OPEN_CASES
+signature OPEN_REP = OPEN_REP
 
-signature LAYERED_GENERIC_REP = LAYERED_GENERIC_REP
+signature LAYERED_REP = LAYERED_REP
 
 signature GENERIC = GENERIC
 signature GENERIC_EXTRA = GENERIC_EXTRA
@@ -24,76 +24,62 @@
 (** === Value Signatures === *)
 
 signature ARBITRARY = ARBITRARY
-signature ARBITRARY_GENERIC = ARBITRARY_GENERIC
+signature ARBITRARY_CASES = ARBITRARY_CASES
 
 signature DATA_REC_INFO = DATA_REC_INFO
-signature DATA_REC_INFO_GENERIC = DATA_REC_INFO_GENERIC
+signature DATA_REC_INFO_CASES = DATA_REC_INFO_CASES
 
 signature DYNAMIC = DYNAMIC
-signature DYNAMIC_GENERIC = DYNAMIC_GENERIC
+signature DYNAMIC_CASES = DYNAMIC_CASES
 
 signature EQ = EQ
-signature EQ_GENERIC = EQ_GENERIC
+signature EQ_CASES = EQ_CASES
 
 signature HASH = HASH
-signature HASH_GENERIC = HASH_GENERIC
+signature HASH_CASES = HASH_CASES
 
 signature ORD = ORD
-signature ORD_GENERIC = ORD_GENERIC
+signature ORD_CASES = ORD_CASES
 
 signature PICKLE = PICKLE
-signature PICKLE_GENERIC = PICKLE_GENERIC
+signature PICKLE_CASES = PICKLE_CASES
 
 signature PRETTY = PRETTY
-signature PRETTY_GENERIC = PRETTY_GENERIC
+signature PRETTY_CASES = PRETTY_CASES
 
 signature REDUCE = REDUCE
-signature REDUCE_GENERIC = REDUCE_GENERIC
+signature REDUCE_CASES = REDUCE_CASES
 
 signature SOME = SOME
-signature SOME_GENERIC = SOME_GENERIC
+signature SOME_CASES = SOME_CASES
 
 signature TRANSFORM = TRANSFORM
-signature TRANSFORM_GENERIC = TRANSFORM_GENERIC
+signature TRANSFORM_CASES = TRANSFORM_CASES
 
 signature TYPE_INFO = TYPE_INFO
-signature TYPE_INFO_GENERIC = TYPE_INFO_GENERIC
+signature TYPE_INFO_CASES = TYPE_INFO_CASES
 
 (** == Exported Structures == *)
 
 structure Generics : GENERICS = Generics
 structure GenericsUtil : GENERICS_UTIL = GenericsUtil
 
-structure RootGeneric : OPEN_GENERIC = RootGeneric
+structure RootGeneric : OPEN_CASES = RootGeneric
 
 (** == Exported Functors == *)
 
-functor CloseGeneric (Arg : OPEN_GENERIC) :
-   CLOSED_GENERIC
+functor CloseCases (Arg : OPEN_CASES) :
+   CLOSED_CASES
       where type  'a      Rep.t = ('a,     Unit.t) Arg.Rep.t
       where type  'a      Rep.s = ('a,     Unit.t) Arg.Rep.s
       where type ('a, 'k) Rep.p = ('a, 'k, Unit.t) Arg.Rep.p =
-   CloseGeneric (Arg)
+   CloseCases (Arg)
 (** Closes an open generic. *)
 
-signature JOIN_GENERICS_DOM = JOIN_GENERICS_DOM
+signature LAYER_REP_DOM = LAYER_REP_DOM
 
-functor JoinGenerics (Arg : JOIN_GENERICS_DOM) :
-   OPEN_GENERIC
-      where type ('a,   'x) Rep.t = ('a,   ('a,   'x) Arg.Inner.Rep.t) Arg.Outer.Rep.t
-      where type ('a,   'x) Rep.s = ('a,   ('a,   'x) Arg.Inner.Rep.s) Arg.Outer.Rep.s
-      where type ('a,'k,'x) Rep.p = ('a,'k,('a,'k,'x) Arg.Inner.Rep.p) Arg.Outer.Rep.p =
-   JoinGenerics (Arg)
-(**
- * Joins two open generic functions.  As can be read from the constraints,
- * the representation of the joined generic is compatible with the
- * representation of the {Outer} generic.
- *)
-
-signature LAYER_GENERIC_REP_DOM = LAYER_GENERIC_REP_DOM
-
-functor LayerGenericRep (Arg : LAYER_GENERIC_REP_DOM) :>
-   LAYERED_GENERIC_REP
+functor LayerRep (Arg : LAYER_REP_DOM) :>
+   LAYERED_REP
       where type  'a      Closed.t =  'a      Arg.Closed.t
       where type  'a      Closed.s =  'a      Arg.Closed.s
       where type ('a, 'k) Closed.p = ('a, 'k) Arg.Closed.p
@@ -101,32 +87,32 @@
       where type ('a,     'x) Outer.t = ('a,     'x) Arg.Outer.t
       where type ('a,     'x) Outer.s = ('a,     'x) Arg.Outer.s
       where type ('a, 'k, 'x) Outer.p = ('a, 'k, 'x) Arg.Outer.p =
-   LayerGenericRep (Arg)
+   LayerRep (Arg)
 (**
  * Creates a layered representation for {LayerGeneric} and
  * {LayerDepGeneric}.
  *)
 
-signature LAYER_GENERIC_DOM = LAYER_GENERIC_DOM
+signature LAYER_CASES_DOM = LAYER_CASES_DOM
 
-functor LayerGeneric (Arg : LAYER_GENERIC_DOM) :
-   OPEN_GENERIC
+functor LayerCases (Arg : LAYER_CASES_DOM) :
+   OPEN_CASES
       where type ('a,     'x) Rep.t = ('a,     'x) Arg.Result.t
       where type ('a,     'x) Rep.s = ('a,     'x) Arg.Result.s
       where type ('a, 'k, 'x) Rep.p = ('a, 'k, 'x) Arg.Result.p =
-   LayerGeneric (Arg)
+   LayerCases (Arg)
 (**
  * Joins an outer open generic function and a closed generic function.
  *)
 
-signature LAYER_DEP_GENERIC_DOM = LAYER_DEP_GENERIC_DOM
+signature LAYER_DEP_CASES_DOM = LAYER_DEP_CASES_DOM
 
-functor LayerDepGeneric (Arg : LAYER_DEP_GENERIC_DOM) :>
-   OPEN_GENERIC
+functor LayerDepCases (Arg : LAYER_DEP_CASES_DOM) :>
+   OPEN_CASES
       where type ('a,     'x) Rep.t = ('a,     'x) Arg.Result.t
       where type ('a,     'x) Rep.s = ('a,     'x) Arg.Result.s
       where type ('a, 'k, 'x) Rep.p = ('a, 'k, 'x) Arg.Result.p =
-   LayerDepGeneric (Arg)
+   LayerDepCases (Arg)
 (**
  * Joins an outer open generic function and a closed generic function that
  * depends on the outer generic.
@@ -143,13 +129,13 @@
 (** === Value Functors === *)
 
 signature WITH_ARBITRARY_DOM = WITH_ARBITRARY_DOM
-functor WithArbitrary (Arg : WITH_ARBITRARY_DOM) : ARBITRARY_GENERIC =
+functor WithArbitrary (Arg : WITH_ARBITRARY_DOM) : ARBITRARY_CASES =
    WithArbitrary (Arg)
 
-functor WithDataRecInfo (Arg : OPEN_GENERIC) : DATA_REC_INFO_GENERIC =
+functor WithDataRecInfo (Arg : OPEN_CASES) : DATA_REC_INFO_CASES =
    WithDataRecInfo (Arg)
 
-functor WithDebug (Arg : OPEN_GENERIC) : OPEN_GENERIC = WithDebug (Arg)
+functor WithDebug (Arg : OPEN_CASES) : OPEN_CASES = WithDebug (Arg)
 (**
  * Checks dynamically that
  * - labels are unique within each record,
@@ -157,27 +143,27 @@
  * - exception constructors are globally unique.
  *)
 
-functor WithDynamic (Arg : OPEN_GENERIC) : DYNAMIC_GENERIC = WithDynamic (Arg)
+functor WithDynamic (Arg : OPEN_CASES) : DYNAMIC_CASES = WithDynamic (Arg)
 
-functor WithEq (Arg : OPEN_GENERIC) : EQ_GENERIC = WithEq (Arg)
+functor WithEq (Arg : OPEN_CASES) : EQ_CASES = WithEq (Arg)
 
 signature WITH_HASH_DOM = WITH_HASH_DOM
-functor WithHash (Arg : WITH_HASH_DOM) : HASH_GENERIC = WithHash (Arg)
+functor WithHash (Arg : WITH_HASH_DOM) : HASH_CASES = WithHash (Arg)
 
-functor WithOrd (Arg : OPEN_GENERIC) : ORD_GENERIC = WithOrd (Arg)
+functor WithOrd (Arg : OPEN_CASES) : ORD_CASES = WithOrd (Arg)
 
 signature WITH_PICKLE_DOM = WITH_PICKLE_DOM
-functor WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_GENERIC = WithPickle (Arg)
+functor WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_CASES = WithPickle (Arg)
 
-functor WithPretty (Arg : OPEN_GENERIC) : PRETTY_GENERIC = WithPretty (Arg)
+functor WithPretty (Arg : OPEN_CASES) : PRETTY_CASES = WithPretty (Arg)
 
-functor WithReduce (Arg : OPEN_GENERIC) : REDUCE_GENERIC = WithReduce (Arg)
+functor WithReduce (Arg : OPEN_CASES) : REDUCE_CASES = WithReduce (Arg)
 
 signature WITH_SOME_DOM = WITH_SOME_DOM
-functor WithSome (Arg : WITH_SOME_DOM) : SOME_GENERIC = WithSome (Arg)
+functor WithSome (Arg : WITH_SOME_DOM) : SOME_CASES = WithSome (Arg)
 
-functor WithTransform (Arg : OPEN_GENERIC) : TRANSFORM_GENERIC =
+functor WithTransform (Arg : OPEN_CASES) : TRANSFORM_CASES =
    WithTransform (Arg)
 
-functor WithTypeInfo (Arg : OPEN_GENERIC) : TYPE_INFO_GENERIC =
+functor WithTypeInfo (Arg : OPEN_CASES) : TYPE_INFO_CASES =
    WithTypeInfo (Arg)

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/generic.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/generic.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/generic.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -8,9 +8,9 @@
  * Base signature for a module of directly usable generics.
  *)
 signature GENERIC = sig
-   structure Open : OPEN_GENERIC
+   structure Open : OPEN_CASES
 
-   include CLOSED_GENERIC
+   include CLOSED_CASES
       where type  'a      Rep.t = ('a,     Unit.t) Open.Rep.t
       where type  'a      Rep.s = ('a,     Unit.t) Open.Rep.s
       where type ('a, 'k) Rep.p = ('a, 'k, Unit.t) Open.Rep.p

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the domain of the {JoinGenerics} functor.
- *)
-signature JOIN_GENERICS_DOM = sig
-   structure Outer : OPEN_GENERIC
-   structure Inner : OPEN_GENERIC
-end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/layer-cases-fun.sig (from rev 5753, mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig	2007-07-10 07:39:05 UTC (rev 5753)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-cases-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,16 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for the domain of the {LayerGeneric} functor.
+ *)
+signature LAYER_CASES_DOM = sig
+   structure Outer : OPEN_CASES
+   structure Result : LAYERED_REP
+   sharing Outer.Rep = Result.Outer
+   include CLOSED_CASES
+   sharing Rep = Result.Closed
+end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-cases-fun.sig (from rev 5823, mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig	2007-08-05 12:15:49 UTC (rev 5823)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-cases-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,47 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for the domain of the {LayerDepCases} functor.
+ *)
+signature LAYER_DEP_CASES_DOM = sig
+   structure Outer : OPEN_CASES
+   structure Result : LAYERED_REP
+   sharing Outer.Rep = Result.Outer
+   val iso : ('b, 'y) Result.t -> ('a, 'b) Iso.t -> 'a Result.Closed.t
+   val isoProduct : ('b, 'k, 'y) Result.p -> ('a, 'b) Iso.t -> ('a, 'k) Result.Closed.p
+   val isoSum : ('b, 'y) Result.s -> ('a, 'b) Iso.t -> 'a Result.Closed.s
+   val *` : ('a, 'k, 'x) Result.p * ('b, 'k, 'y) Result.p -> (('a, 'b) Product.t, 'k) Result.Closed.p
+   val T : ('a, 'x) Result.t -> ('a, Generics.Tuple.t) Result.Closed.p
+   val R : Generics.Label.t -> ('a, 'x) Result.t -> ('a, Generics.Record.t) Result.Closed.p
+   val tuple : ('a, Generics.Tuple.t, 'x) Result.p -> 'a Result.Closed.t
+   val record : ('a, Generics.Record.t, 'x) Result.p -> 'a Result.Closed.t
+   val +` : ('a, 'x) Result.s * ('b, 'y) Result.s -> (('a, 'b) Sum.t) Result.Closed.s
+   val C0 : Generics.Con.t -> Unit.t Result.Closed.s
+   val C1 : Generics.Con.t -> ('a, 'x) Result.t -> 'a Result.Closed.s
+   val data : ('a, 'x) Result.s -> 'a Result.Closed.t
+   val unit : Unit.t Result.Closed.t
+   val Y : 'a Result.Closed.t Tie.t
+   val --> : ('a, 'x) Result.t * ('b, 'y) Result.t -> ('a -> 'b) Result.Closed.t
+   val exn : Exn.t Result.Closed.t
+   val regExn : ('a, 'x) Result.s -> ('a, Exn.t) Emb.t Effect.t
+   val array : ('a, 'x) Result.t -> 'a Array.t Result.Closed.t
+   val refc : ('a, 'x) Result.t -> 'a Ref.t Result.Closed.t
+   val vector : ('a, 'x) Result.t -> 'a Vector.t Result.Closed.t
+   val largeInt : LargeInt.t Result.Closed.t
+   val largeReal : LargeReal.t Result.Closed.t
+   val largeWord : LargeWord.t Result.Closed.t
+   val word8 : Word8.t  Result.Closed.t
+   val word32 : Word32.t Result.Closed.t
+   val word64 : Word64.t Result.Closed.t
+   val list : ('a, 'x) Result.t -> 'a List.t Result.Closed.t
+   val bool : Bool.t Result.Closed.t
+   val char : Char.t Result.Closed.t
+   val int : Int.t Result.Closed.t
+   val real : Real.t Result.Closed.t
+   val string : String.t Result.Closed.t
+   val word : Word.t Result.Closed.t
+end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-dep-generic-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,47 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the domain of the {LayerDepGeneric} functor.
- *)
-signature LAYER_DEP_GENERIC_DOM = sig
-   structure Outer : OPEN_GENERIC
-   structure Result : LAYERED_GENERIC_REP
-   sharing Outer.Rep = Result.Outer
-   val iso : ('b, 'y) Result.t -> ('a, 'b) Iso.t -> 'a Result.Closed.t
-   val isoProduct : ('b, 'k, 'y) Result.p -> ('a, 'b) Iso.t -> ('a, 'k) Result.Closed.p
-   val isoSum : ('b, 'y) Result.s -> ('a, 'b) Iso.t -> 'a Result.Closed.s
-   val *` : ('a, 'k, 'x) Result.p * ('b, 'k, 'y) Result.p -> (('a, 'b) Product.t, 'k) Result.Closed.p
-   val T : ('a, 'x) Result.t -> ('a, Generics.Tuple.t) Result.Closed.p
-   val R : Generics.Label.t -> ('a, 'x) Result.t -> ('a, Generics.Record.t) Result.Closed.p
-   val tuple : ('a, Generics.Tuple.t, 'x) Result.p -> 'a Result.Closed.t
-   val record : ('a, Generics.Record.t, 'x) Result.p -> 'a Result.Closed.t
-   val +` : ('a, 'x) Result.s * ('b, 'y) Result.s -> (('a, 'b) Sum.t) Result.Closed.s
-   val C0 : Generics.Con.t -> Unit.t Result.Closed.s
-   val C1 : Generics.Con.t -> ('a, 'x) Result.t -> 'a Result.Closed.s
-   val data : ('a, 'x) Result.s -> 'a Result.Closed.t
-   val unit : Unit.t Result.Closed.t
-   val Y : 'a Result.Closed.t Tie.t
-   val --> : ('a, 'x) Result.t * ('b, 'y) Result.t -> ('a -> 'b) Result.Closed.t
-   val exn : Exn.t Result.Closed.t
-   val regExn : ('a, 'x) Result.s -> ('a, Exn.t) Emb.t Effect.t
-   val array : ('a, 'x) Result.t -> 'a Array.t Result.Closed.t
-   val refc : ('a, 'x) Result.t -> 'a Ref.t Result.Closed.t
-   val vector : ('a, 'x) Result.t -> 'a Vector.t Result.Closed.t
-   val largeInt : LargeInt.t Result.Closed.t
-   val largeReal : LargeReal.t Result.Closed.t
-   val largeWord : LargeWord.t Result.Closed.t
-   val word8 : Word8.t  Result.Closed.t
-   val word32 : Word32.t Result.Closed.t
-   val word64 : Word64.t Result.Closed.t
-   val list : ('a, 'x) Result.t -> 'a List.t Result.Closed.t
-   val bool : Bool.t Result.Closed.t
-   val char : Char.t Result.Closed.t
-   val int : Int.t Result.Closed.t
-   val real : Real.t Result.Closed.t
-   val string : String.t Result.Closed.t
-   val word : Word.t Result.Closed.t
-end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,16 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the domain of the {LayerGeneric} functor.
- *)
-signature LAYER_GENERIC_DOM = sig
-   structure Outer : OPEN_GENERIC
-   structure Result : LAYERED_GENERIC_REP
-   sharing Outer.Rep = Result.Outer
-   include CLOSED_GENERIC
-   sharing Rep = Result.Closed
-end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,13 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the domain of the {LayerGenericRep} functor.
- *)
-signature LAYER_GENERIC_REP_DOM = sig
-   structure Outer : OPEN_GENERIC_REP
-   structure Closed : CLOSED_GENERIC_REP
-end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/layer-rep-fun.sig (from rev 5753, mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layer-generic-rep-fun.sig	2007-07-10 07:39:05 UTC (rev 5753)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layer-rep-fun.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for the domain of the {LayerGenericRep} functor.
+ *)
+signature LAYER_REP_DOM = sig
+   structure Outer : OPEN_REP
+   structure Closed : CLOSED_REP
+end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig	2007-08-08 08:31:28 UTC (rev 5833)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -1,34 +0,0 @@
-(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
- *
- * This code is released under the MLton license, a BSD-style license.
- * See the LICENSE file or http://mlton.org/License for details.
- *)
-
-(**
- * Signature for the layered representation types of generics.
- *)
-signature LAYERED_GENERIC_REP = sig
-   structure Outer : OPEN_GENERIC_REP
-   structure Closed : CLOSED_GENERIC_REP
-   structure Inner : sig
-      include OPEN_GENERIC_REP
-      val mkT :  'a      Closed.t * 'x -> ('a,     'x) t
-      val mkS :  'a      Closed.s * 'x -> ('a,     'x) s
-      val mkP : ('a, 'k) Closed.p * 'x -> ('a, 'k, 'x) p
-
-      val mkY : 'a Closed.t Tie.t * 'x Tie.t -> ('a, 'x) t Tie.t
-   end
-   include OPEN_GENERIC_REP
-      where type ('a,     'x) t = ('a,     ('a,     'x) Inner.t) Outer.t
-      where type ('a,     'x) s = ('a,     ('a,     'x) Inner.s) Outer.s
-      where type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k, 'x) Inner.p) Outer.p
-   structure This : sig
-      val getT : ('a,     'x) t ->  'a      Closed.t
-      val getS : ('a,     'x) s ->  'a      Closed.s
-      val getP : ('a, 'k, 'x) p -> ('a, 'k) Closed.p
-
-      val mapT :  'a      Closed.t UnOp.t -> ('a,     'x) t UnOp.t
-      val mapS :  'a      Closed.s UnOp.t -> ('a,     'x) s UnOp.t
-      val mapP : ('a, 'k) Closed.p UnOp.t -> ('a, 'k, 'x) p UnOp.t
-   end
-end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/layered-rep.sig (from rev 5753, mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig)
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/layered-generic-rep.sig	2007-07-10 07:39:05 UTC (rev 5753)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/layered-rep.sig	2007-08-08 08:35:36 UTC (rev 5834)
@@ -0,0 +1,34 @@
+(* Copyright (C) 2007 SSH Communications Security, Helsinki, Finland
+ *
+ * This code is released under the MLton license, a BSD-style license.
+ * See the LICENSE file or http://mlton.org/License for details.
+ *)
+
+(**
+ * Signature for the layered representation types of generics.
+ *)
+signature LAYERED_REP = sig
+   structure Outer : OPEN_REP
+   structure Closed : CLOSED_REP
+   structure Inner : sig
+      include OPEN_REP
+      val mkT :  'a      Closed.t * 'x -> ('a,     'x) t
+      val mkS :  'a      Closed.s * 'x -> ('a,     'x) s
+      val mkP : ('a, 'k) Closed.p * 'x -> ('a, 'k, 'x) p
+
+      val mkY : 'a Closed.t Tie.t * 'x Tie.t -> ('a, 'x) t Tie.t
+   end
+   include OPEN_REP
+      where type ('a,     'x) t = ('a,     ('a,     'x) Inner.t) Outer.t
+      where type ('a,     'x) s = ('a,     ('a,     'x) Inner.s) Outer.s
+      where type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k, 'x) Inner.p) Outer.p
+   structure This : sig
+      val getT : ('a,     'x) t ->  'a      Closed.t
+      val getS : ('a,     'x) s ->  'a      Closed.s
+      val getP : ('a, 'k, 'x) p -> ('a, 'k) Closed.p
+
+      val mapT :  'a      Closed.t UnOp.t -> ('a,     'x) t UnOp.t
+      val mapS :  'a      Closed.s UnOp.t -> ('a,     'x) s UnOp.t
+      val mapP : ('a, 'k) Closed.p UnOp.t -> ('a, 'k, 'x) p UnOp.t
+   end
+end

Copied: mltonlib/trunk/com/ssh/generic/unstable/public/open-cases.sig (from rev 5823, mltonlib/trunk/com/ssh/generic/unstable/public/open-generic.sig)
=============



More information about the MLton-commit mailing list