[MLton-commit] r5594

Vesa Karvonen vesak at mlton.org
Thu Jun 7 07:45:52 PDT 2007


Towards extensible generics.

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

U   mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
A   mltonlib/trunk/com/ssh/generic/unstable/detail/ground-generic.fun
A   mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun
A   mltonlib/trunk/com/ssh/generic/unstable/detail/lift-generic.fun
U   mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
U   mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
U   mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
D   mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-fun.sig
U   mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig
A   mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig

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

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-06-07 14:45:50 UTC (rev 5594)
@@ -6,7 +6,7 @@
 
 structure Generic :> EXT_GENERIC = struct
    (* <-- SML/NJ workaround *)
-   open Basic Fn
+   open Fn
    (* SML/NJ workaround --> *)
 
    structure Index = struct
@@ -23,43 +23,38 @@
       val mapP = id
    end
 
-   val nullary = id
-   fun unary x x2y = x2y x
-   fun binary xy xy2z = xy2z xy
-   fun morph y _ y2x = y2x y
-
-   val iso = morph
-   val isoProduct = morph
-   val isoSum = morph
-   val op *` = binary
-   val T = unary
-   fun R _ = unary
-   val tuple = unary
-   val record = unary
-   val op +` = binary
-   fun C0 _ = nullary
-   fun C1 _ = unary
-   val data = unary
-   val unit = nullary
-   val Y = nullary
-   val op --> = binary
-   val exn = nullary
-   fun regExn x _ x2ef = x2ef x
-   val array = unary
-   val refc = unary
-   val vector = unary
-   val largeInt = nullary
-   val largeReal = nullary
-   val largeWord = nullary
-   val word8 = nullary
-(* val word16 = nullary (* Word16 not provided by SML/NJ *) *)
-   val word32 = nullary
-   val word64 = nullary
-   val list = unary
-   val bool = nullary
-   val char = nullary
-   val int = nullary
-   val real = nullary
-   val string = nullary
-   val word = nullary
+   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 regExn = id
+   val array = id
+   val refc = id
+   val vector = id
+   val largeInt = id
+   val largeReal = id
+   val largeWord = id
+   val word8 = id
+(* val word16 = id (* Word16 not provided by SML/NJ *) *)
+   val word32 = 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
 end

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/ground-generic.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ground-generic.fun	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ground-generic.fun	2007-06-07 14:45:50 UTC (rev 5594)
@@ -0,0 +1,54 @@
+(* 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.
+ *)
+
+functor GroundGeneric (Arg : EXT_GENERIC) :> GENERIC = struct
+   (* <-- SML/NJ workaround *)
+   open Fn
+   (* SML/NJ workaround --> *)
+
+   structure Index : GENERIC_INDEX = struct
+      type 'a t = ('a, Unit.t) Arg.Index.t
+      type 'a s = ('a, Unit.t) Arg.Index.s
+      type ('a, 'k) p = ('a, 'k, Unit.t) Arg.Index.p
+   end
+
+   fun morph m = m (const ignore)
+
+   fun iso ? = morph Arg.iso ?
+   fun isoProduct ? = morph Arg.isoProduct ?
+   fun isoSum ? = morph Arg.isoSum ?
+   fun op *` ? = Arg.*` ignore ?
+   fun T ? = Arg.T ignore ?
+   fun R ? = Arg.R (const ignore) ?
+   fun tuple ? = Arg.tuple ignore ?
+   fun record ? = Arg.record ignore ?
+   fun op +` ? = Arg.+` ignore ?
+   fun C0 ? = Arg.C0 (const ()) ?
+   fun C1 ? = Arg.C1 (const ignore) ?
+   fun data ? = Arg.data ignore ?
+   val unit = Arg.unit ()
+   fun Y ? = Arg.Y Tie.unit ?
+   fun op --> ? = Arg.--> ignore ?
+   val exn = Arg.exn ()
+   fun regExn ? = Arg.regExn (const ignore) ?
+   fun array ? = Arg.array ignore ?
+   fun refc ? = Arg.refc ignore ?
+   fun vector ? = Arg.vector ignore ?
+   val largeInt = Arg.largeInt ()
+   val largeReal = Arg.largeReal ()
+   val largeWord = Arg.largeWord ()
+   val word8 = Arg.word8 ()
+(* val word16 = Arg.word16 () (* Word16 not provided by SML/NJ *) *)
+   val word32 = Arg.word32 ()
+   val word64 = Arg.word64 ()
+   fun list ? = Arg.list ignore ?
+   val bool = Arg.bool ()
+   val char = Arg.char ()
+   val int = Arg.int ()
+   val real = Arg.real ()
+   val string = Arg.string ()
+   val word = Arg.word ()
+end


Property changes on: mltonlib/trunk/com/ssh/generic/unstable/detail/ground-generic.fun
___________________________________________________________________
Name: svn:eol-style
   + native

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun	2007-06-07 14:45:50 UTC (rev 5594)
@@ -0,0 +1,67 @@
+(* 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.
+ *)
+
+functor JoinGenerics (Arg : JOIN_GENERICS_DOM) :>
+   EXT_GENERIC
+      where type ('a, 'x) Index.t =
+                 ('a, ('a, 'x) Arg.Inner.Index.t) Arg.Outer.Index.t
+      where type ('a, 'x) Index.s =
+                 ('a, ('a, 'x) Arg.Inner.Index.s) Arg.Outer.Index.s
+      where type ('a, 'k, 'x) Index.p =
+                 ('a, 'k, ('a, 'k, 'x) Arg.Inner.Index.p) Arg.Outer.Index.p =
+struct
+   open Arg
+
+   structure Index : EXT_GENERIC_INDEX = struct
+      type ('a, 'x) t = ('a, ('a, 'x) Inner.Index.t) Outer.Index.t
+      fun getT ? = Inner.Index.getT (Outer.Index.getT ?)
+      fun mapT ? = Outer.Index.mapT (Inner.Index.mapT ?)
+
+      type ('a, 'x) s = ('a, ('a, 'x) Inner.Index.s) Outer.Index.s
+      fun getS ? = Inner.Index.getS (Outer.Index.getS ?)
+      fun mapS ? = Outer.Index.mapS (Inner.Index.mapS ?)
+
+      type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k, 'x) Inner.Index.p) Outer.Index.p
+      fun getP ? = Inner.Index.getP (Outer.Index.getP ?)
+      fun mapP ? = Outer.Index.mapP (Inner.Index.mapP ?)
+   end
+
+   fun iso ? = Outer.iso (Inner.iso ?)
+   fun isoProduct ? = Outer.isoProduct (Inner.isoProduct ?)
+   fun isoSum ? = Outer.isoSum (Inner.isoSum ?)
+   fun op *` ? = Outer.*` (Inner.*` ?)
+   fun T ? = Outer.T (Inner.T ?)
+   fun R ? = Outer.R (Inner.R ?)
+   fun tuple ? = Outer.tuple (Inner.tuple ?)
+   fun record ? = Outer.record (Inner.record ?)
+   fun op +` ? = Outer.+` (Inner.+` ?)
+   fun C0 ? = Outer.C0 (Inner.C0 ?)
+   fun C1 ? = Outer.C1 (Inner.C1 ?)
+   fun data ? = Outer.data (Inner.data ?)
+   fun unit ? = Outer.unit (Inner.unit ?)
+   fun Y ? = Outer.Y (Inner.Y ?)
+   fun op --> ? = Outer.--> (Inner.--> ?)
+   fun exn ? = Outer.exn (Inner.exn ?)
+   fun regExn ? = Outer.regExn (Inner.regExn ?)
+   fun array ? = Outer.array (Inner.array ?)
+   fun refc ? = Outer.refc (Inner.refc ?)
+   fun vector ? = Outer.vector (Inner.vector ?)
+   fun largeInt ? = Outer.largeInt (Inner.largeInt ?)
+   fun largeReal ? = Outer.largeReal (Inner.largeReal ?)
+   fun largeWord ? = Outer.largeWord (Inner.largeWord ?)
+   fun word8 ? = Outer.word8 (Inner.word8 ?)
+(* fun word16 ? = Outer.word16 (Inner.word16 ?)
+   (* Word16 not provided by SML/NJ *) *)
+   fun word32 ? = Outer.word32 (Inner.word32 ?)
+   fun word64 ? = Outer.word64 (Inner.word64 ?)
+   fun list ? = Outer.list (Inner.list ?)
+   fun bool ? = Outer.bool (Inner.bool ?)
+   fun char ? = Outer.char (Inner.char ?)
+   fun int ? = Outer.int (Inner.int ?)
+   fun real ? = Outer.real (Inner.real ?)
+   fun string ? = Outer.string (Inner.string ?)
+   fun word ? = Outer.word (Inner.word ?)
+end


Property changes on: mltonlib/trunk/com/ssh/generic/unstable/detail/join-generics.fun
___________________________________________________________________
Name: svn:eol-style
   + native

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/lift-generic.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/lift-generic.fun	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/lift-generic.fun	2007-06-07 14:45:50 UTC (rev 5594)
@@ -0,0 +1,68 @@
+(* 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.
+ *)
+
+functor LiftGeneric (Arg : GENERIC) :> EXT_GENERIC = struct
+   (* <-- SML/NJ workaround *)
+   open Fn
+   (* SML/NJ workaround --> *)
+
+   structure Index : EXT_GENERIC_INDEX = struct
+      val get = Pair.snd
+      fun map f = Pair.map (id, f)
+
+      type ('a, 'x) t = 'a Arg.Index.t * 'x
+      val getT = get
+      val mapT = map
+
+      type ('a, 'x) s = 'a Arg.Index.s * 'x
+      val getS = get
+      val mapS = map
+
+      type ('a, 'k, 'x) p = ('a, 'k) Arg.Index.p * 'x
+      val getP = get
+      val mapP = map
+   end
+
+   fun unary arg fx = Pair.map (arg, fx)
+   fun binary arg fxy x = Pair.map (arg x, fxy x)
+   fun binop arg fxy = Pair.map (arg, fxy) o Pair.swizzle
+   fun morph arg f (a, x) aIb = (arg a aIb, f x aIb)
+
+   fun iso ? = morph Arg.iso ?
+   fun isoProduct ? = morph Arg.isoProduct ?
+   fun isoSum ? = morph Arg.isoSum ?
+   fun op *` ? = binop Arg.*` ?
+   fun T ? = unary Arg.T ?
+   fun R ? = binary Arg.R ?
+   fun tuple ? = unary Arg.tuple ?
+   fun record ? = unary Arg.record ?
+   fun op +` ? = binop Arg.+` ?
+   fun C0 fc c = (Arg.C0 c, fc c)
+   fun C1 ? = binary Arg.C1 ?
+   fun data ? = unary Arg.data ?
+   fun unit x = (Arg.unit, x)
+   fun Y y = Tie.tuple2 (Arg.Y, y)
+   fun op --> ? = binop Arg.--> ?
+   fun exn x = (Arg.exn, x)
+   fun regExn x2ef (a, x) = Pair.app (Arg.regExn a, x2ef x) o Sq.mk
+   fun array ? = unary Arg.array ?
+   fun refc ? = unary Arg.refc ?
+   fun vector ? = unary Arg.vector ?
+   fun largeInt x = (Arg.largeInt, x)
+   fun largeReal x = (Arg.largeReal, x)
+   fun largeWord x = (Arg.largeWord, x)
+   fun word8 x = (Arg.word8, x)
+(* fun word16 x = (Arg.word16, x) (* Word16 not provided by SML/NJ *) *)
+   fun word32 x = (Arg.word32, x)
+   fun word64 x = (Arg.word64, x)
+   fun list ? = unary Arg.list ?
+   fun bool x = (Arg.bool, x)
+   fun char x = (Arg.char, x)
+   fun int x = (Arg.int, x)
+   fun real x = (Arg.real, x)
+   fun string x = (Arg.string, x)
+   fun word x = (Arg.word, x)
+end


Property changes on: mltonlib/trunk/com/ssh/generic/unstable/detail/lift-generic.fun
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-06-07 14:45:50 UTC (rev 5594)
@@ -6,13 +6,15 @@
 
 group is
    ../../../../../extended-basis/unstable/basis.cm
-   ../../../public/ext-generic-fun.sig
    ../../../public/ext-generic-index.sig
    ../../../public/ext-generic.sig
    ../../../public/generic-index.sig
    ../../../public/generic.sig
    ../../../public/generics.sig
-   ../../ext-generic.fun
+   ../../../public/join-generics-fun.sig
    ../../generic.sml
    ../../generics.sml
+   ../../ground-generic.fun
+   ../../join-generics.fun
+   ../../lift-generic.fun
    ../../sml-syntax.sml

Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-07 14:45:50 UTC (rev 5594)
@@ -28,8 +28,11 @@
 
          detail/generic.sml
 
-         public/ext-generic-fun.sig
-         detail/ext-generic.fun
+         detail/ground-generic.fun
+         detail/lift-generic.fun
+
+         public/join-generics-fun.sig
+         detail/join-generics.fun
       in
          public/export.sml
       end

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-06-07 14:45:50 UTC (rev 5594)
@@ -14,8 +14,7 @@
 signature EXT_GENERIC = EXT_GENERIC
 signature EXT_GENERIC_INDEX = EXT_GENERIC_INDEX
 
-signature EXT_GENERIC_COD = EXT_GENERIC_COD
-signature EXT_GENERIC_DOM = EXT_GENERIC_DOM
+signature JOIN_GENERICS_DOM = JOIN_GENERICS_DOM
 
 (** == Exported Structures == *)
 
@@ -24,4 +23,23 @@
 
 (** == Exported Functors == *)
 
-functor ExtGeneric (Arg : EXT_GENERIC_DOM) : EXT_GENERIC_COD = ExtGeneric (Arg)
+functor GroundGeneric (Arg : EXT_GENERIC) : GENERIC = GroundGeneric (Arg)
+(** Grounds an extensible generic to an ordinary generic. *)
+
+functor LiftGeneric (Arg : GENERIC) : EXT_GENERIC = LiftGeneric (Arg)
+(** Lifts an ordinary generic to an extensible generic. *)
+
+functor JoinGenerics (Arg : JOIN_GENERICS_DOM) :
+   EXT_GENERIC
+      where type ('a, 'b, 'c) Index.p =
+                 ('a, 'b, ('a, 'b, 'c) Arg.Inner.Index.p) Arg.Outer.Index.p
+      where type ('a, 'b) Index.s =
+                 ('a, ('a, 'b) Arg.Inner.Index.s) Arg.Outer.Index.s
+      where type ('a, 'b) Index.t =
+                 ('a, ('a, 'b) Arg.Inner.Index.t) Arg.Outer.Index.t =
+   JoinGenerics (Arg)
+(**
+ * Joins two extensible generic functions.  As can be read from the where
+ * -constraints, the type-indices of the joined generic are compatible
+ * with the type-indices of the {Outer} generic.
+ *)

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-fun.sig	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-fun.sig	2007-06-07 14:45:50 UTC (rev 5594)
@@ -1,18 +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 EXT_GENERIC_DOM = sig
-   structure Ext : EXT_GENERIC
-   structure New : GENERIC
-end
-
-signature EXT_GENERIC_COD = sig
-   structure Ext : EXT_GENERIC
-   structure Gen : GENERIC
-      where type 'a Index.t = ('a, Unit.t) Ext.Index.t
-      where type 'a Index.s = ('a, Unit.t) Ext.Index.s
-      where type ('a, 'k) Index.p = ('a, 'k, Unit.t) Ext.Index.p
-end

Modified: mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig	2007-06-07 14:45:50 UTC (rev 5594)
@@ -6,27 +6,26 @@
 
 signature EXT_GENERIC = sig
    structure Index : EXT_GENERIC_INDEX
-   val iso : ('b, 'y) Index.t -> ('a, 'b) Iso.t -> ('y -> 'x) -> ('a, 'x) Index.t
-   val isoProduct : ('b, 'k, 'y) Index.p -> ('a, 'b) Iso.t -> ('y -> 'x) -> ('a, 'k, 'x) Index.p
-   val isoSum : ('b, 'y) Index.s -> ('a, 'b) Iso.t -> ('y -> 'x) -> ('a, 'x) Index.s
-   val *` : ('a, 'k, 'x) Index.p * ('b, 'k, 'y) Index.p -> ('x * 'y -> 'z)
-            -> (('a, 'b) Product.t, 'k, 'z) Index.p
-   val T : ('a, 'x) Index.t -> ('x -> 'y) -> ('a, Generics.Tuple.t, 'y) Index.p
-   val R : Generics.Label.t -> ('a, 'x) Index.t -> ('x -> 'y) -> ('a, Generics.Record.t, 'y) Index.p
-   val tuple : ('a, Generics.Tuple.t, 'x) Index.p -> ('x -> 'y) -> ('a, 'y) Index.t
-   val record : ('a, Generics.Record.t, 'x) Index.p -> ('x -> 'y) -> ('a, 'y) Index.t
-   val +` : ('a, 'x) Index.s * ('b, 'y) Index.s -> ('x * 'y -> 'z) -> (('a, 'b) Sum.t, 'z) Index.s
-   val C0 : Generics.Con.t -> 'x -> (Unit.t, 'x) Index.s
-   val C1 : Generics.Con.t -> ('a, 'x) Index.t -> ('x -> 'y) -> ('a, 'y) Index.s
-   val data : ('a, 'x) Index.s -> ('x -> 'y) -> ('a, 'y) Index.t
+   val iso : ('y -> ('a, 'b) Iso.t -> 'x) -> ('b, 'y) Index.t -> ('a, 'b) Iso.t -> ('a, 'x) Index.t
+   val isoProduct : ('y -> ('a, 'b) Iso.t -> 'x) -> ('b, 'k, 'y) Index.p -> ('a, 'b) Iso.t -> ('a, 'k, 'x) Index.p
+   val isoSum : ('y -> ('a, 'b) Iso.t -> 'x) -> ('b, 'y) Index.s -> ('a, 'b) Iso.t -> ('a, 'x) Index.s
+   val *` : ('x * 'y -> 'z) -> ('a, 'k, 'x) Index.p * ('b, 'k, 'y) Index.p -> (('a, 'b) Product.t, 'k, 'z) Index.p
+   val T : ('x -> 'y) -> ('a, 'x) Index.t -> ('a, Generics.Tuple.t, 'y) Index.p
+   val R : (Generics.Label.t -> 'x -> 'y) -> Generics.Label.t -> ('a, 'x) Index.t -> ('a, Generics.Record.t, 'y) Index.p
+   val tuple : ('x -> 'y) -> ('a, Generics.Tuple.t, 'x) Index.p -> ('a, 'y) Index.t
+   val record : ('x -> 'y) -> ('a, Generics.Record.t, 'x) Index.p -> ('a, 'y) Index.t
+   val +` : ('x * 'y -> 'z) -> ('a, 'x) Index.s * ('b, 'y) Index.s -> (('a, 'b) Sum.t, 'z) Index.s
+   val C0 : (Generics.Con.t -> 'x) -> Generics.Con.t -> (Unit.t, 'x) Index.s
+   val C1 : (Generics.Con.t -> 'x -> 'y) -> Generics.Con.t -> ('a, 'x) Index.t -> ('a, 'y) Index.s
+   val data : ('x -> 'y) -> ('a, 'x) Index.s -> ('a, 'y) Index.t
    val unit : 'x -> (Unit.t, 'x) Index.t
    val Y : 'x Tie.t -> ('a, 'x) Index.t Tie.t
-   val --> : ('a, 'x) Index.t * ('b, 'y) Index.t -> ('x * 'y -> 'z) -> ('a -> 'b, 'z) Index.t
+   val --> : ('x * 'y -> 'z) -> ('a, 'x) Index.t * ('b, 'y) Index.t -> ('a -> 'b, 'z) Index.t
    val exn : 'x -> (Exn.t, 'x) Index.t
-   val regExn : ('a, 'x) Index.s -> ('a, Exn.t) Emb.t -> 'x Effect.t Effect.t
-   val array : ('a, 'x) Index.t -> ('x -> 'y) -> ('a Array.t, 'y) Index.t
-   val refc : ('a, 'x) Index.t -> ('x -> 'y) -> ('a Ref.t, 'y) Index.t
-   val vector : ('a, 'x) Index.t -> ('x -> 'y) -> ('a Vector.t, 'y) Index.t
+   val regExn : ('x -> ('a, Exn.t) Emb.t Effect.t) -> ('a, 'x) Index.s -> ('a, Exn.t) Emb.t Effect.t
+   val array : ('x -> 'y) -> ('a, 'x) Index.t -> ('a Array.t, 'y) Index.t
+   val refc : ('x -> 'y) -> ('a, 'x) Index.t -> ('a Ref.t, 'y) Index.t
+   val vector : ('x -> 'y) -> ('a, 'x) Index.t -> ('a Vector.t, 'y) Index.t
    val largeInt : 'x -> (LargeInt.t, 'x) Index.t
    val largeReal : 'x -> (LargeReal.t, 'x) Index.t
    val largeWord : 'x -> (LargeWord.t, 'x) Index.t
@@ -34,7 +33,7 @@
 (* val word16 : 'x -> (Word16.t, 'x) Index.t (* Word16 not provided by SML/NJ *) *)
    val word32 : 'x -> (Word32.t, 'x) Index.t
    val word64 : 'x -> (Word64.t, 'x) Index.t
-   val list : ('a, 'x) Index.t -> ('x -> 'y) -> ('a List.t, 'y) Index.t
+   val list : ('x -> 'y) -> ('a, 'x) Index.t -> ('a List.t, 'y) Index.t
    val bool : 'x -> (Bool.t, 'x) Index.t
    val char : 'x -> (Char.t, 'x) Index.t
    val int : 'x -> (Int.t, 'x) Index.t

Added: mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig	2007-06-07 09:57:22 UTC (rev 5593)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig	2007-06-07 14:45:50 UTC (rev 5594)
@@ -0,0 +1,10 @@
+(* 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 JOIN_GENERICS_DOM = sig
+   structure Outer : EXT_GENERIC
+   structure Inner : EXT_GENERIC
+end


Property changes on: mltonlib/trunk/com/ssh/generic/unstable/public/join-generics-fun.sig
___________________________________________________________________
Name: svn:eol-style
   + native




More information about the MLton-commit mailing list