[MLton-commit] r5593

Vesa Karvonen vesak at mlton.org
Thu Jun 7 02:57:24 PDT 2007


Beginnings of a new linear complexity type-index extension scheme.

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

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

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

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/ext-generic.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/ext-generic.fun	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ext-generic.fun	2007-06-07 09:57:22 UTC (rev 5593)
@@ -0,0 +1,127 @@
+(* 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 ExtGeneric (Arg : EXT_GENERIC_DOM) :>
+   EXT_GENERIC_COD
+      where type ('a, 'x) Ext.Index.t =
+                 ('a, 'a Arg.New.Index.t * 'x) Arg.Ext.Index.t
+      where type ('a, 'x) Ext.Index.s =
+                 ('a, 'a Arg.New.Index.s * 'x) Arg.Ext.Index.s
+      where type ('a, 'k, 'x) Ext.Index.p =
+                 ('a, 'k, ('a, 'k) Arg.New.Index.p * 'x) Arg.Ext.Index.p =
+struct
+   (* <-- SML/NJ workaround *)
+   open Fn
+   (* SML/NJ workaround --> *)
+
+   open Arg
+
+   structure Ext : EXT_GENERIC = struct
+      structure Index : EXT_GENERIC_INDEX = struct
+         fun get get = Pair.snd o get
+         fun map map f = map (Pair.map (id, f))
+
+         type ('a, 'x) t = ('a, 'a New.Index.t * 'x) Ext.Index.t
+         fun getT ? = get Ext.Index.getT ?
+         fun mapT ? = map Ext.Index.mapT ?
+
+         type ('a, 'x) s = ('a, 'a New.Index.s * 'x) Ext.Index.s
+         fun getS ? = get Ext.Index.getS ?
+         fun mapS ? = map Ext.Index.mapS ?
+
+         type ('a, 'k, 'x) p = ('a, 'k, ('a, 'k) New.Index.p * 'x) Ext.Index.p
+         fun getP ? = get Ext.Index.getP ?
+         fun mapP ? = map Ext.Index.mapP ?
+      end
+
+      fun nullary ext new x = ext (new, x)
+      fun unary ext new a x2y = ext a (Pair.map (new, x2y))
+      fun binary ext new ab xy2z =
+          ext ab (Pair.map (new, xy2z) o Pair.swizzle)
+      fun morph ext new by aIb y2x =
+          ext by aIb (Pair.map (flip new aIb, y2x))
+
+      fun iso ? = morph Ext.iso New.iso ?
+      fun isoProduct ? = morph Ext.isoProduct New.isoProduct ?
+      fun isoSum ? = morph Ext.isoSum New.isoSum ?
+      fun op *` ? = binary Ext.*` New.*` ?
+      fun T ? = unary Ext.T New.T ?
+      fun R l = unary (Ext.R l) (New.R l)
+      fun tuple ? = unary Ext.tuple New.tuple ?
+      fun record ? = unary Ext.record New.record ?
+      fun op +` ? = binary Ext.+` New.+` ?
+      fun C0 c = nullary (Ext.C0 c) (New.C0 c)
+      fun C1 c = unary (Ext.C1 c) (New.C1 c)
+      fun data ? = unary Ext.data New.data ?
+      fun unit ? = nullary Ext.unit New.unit ?
+      fun Y y = Ext.Y (Tie.tuple2 (New.Y, y))
+      fun op --> ? = binary Ext.--> New.--> ?
+      fun exn ? = nullary Ext.exn New.exn ?
+      fun regExn a e x2ef =
+          Ext.regExn a e (fn (a, x) => (New.regExn a e ; x2ef x))
+      fun array ? = unary Ext.array New.array ?
+      fun refc ? = unary Ext.refc New.refc ?
+      fun vector ? = unary Ext.vector New.vector ?
+      fun largeInt ? = nullary Ext.largeInt New.largeInt ?
+      fun largeReal ? = nullary Ext.largeReal New.largeReal ?
+      fun largeWord ? = nullary Ext.largeWord New.largeWord ?
+      fun word8 ? = nullary Ext.word8 New.word8 ?
+   (* fun word16 ? = nullary Ext.word16 New.word16 ?
+      (* Word16 not provided by SML/NJ *) *)
+      fun word32 ? = nullary Ext.word32 New.word32 ?
+      fun word64 ? = nullary Ext.word64 New.word64 ?
+      fun list ? = unary Ext.list New.list ?
+      fun bool ? = nullary Ext.bool New.bool ?
+      fun char ? = nullary Ext.char New.char ?
+      fun int ? = nullary Ext.int New.int ?
+      fun real ? = nullary Ext.real New.real ?
+      fun string ? = nullary Ext.string New.string ?
+      fun word ? = nullary Ext.word New.word ?
+   end
+
+   structure Gen : GENERIC = struct
+      structure Index : GENERIC_INDEX = struct
+         type 'a t = ('a, Unit.t) Ext.Index.t
+         type 'a s = ('a, Unit.t) Ext.Index.s
+         type ('a, 'k) p = ('a, 'k, Unit.t) Ext.Index.p
+      end
+
+      fun iso b aIb = Ext.iso b aIb ignore
+      fun isoProduct b aIb = Ext.isoProduct b aIb ignore
+      fun isoSum b aIb = Ext.isoSum b aIb ignore
+      fun op *` ab = Ext.*` ab ignore
+      fun T a = Ext.T a ignore
+      fun R l a = Ext.R l a ignore
+      fun tuple a = Ext.tuple a ignore
+      fun record a = Ext.record a ignore
+      fun op +` ab = Ext.+` ab ignore
+      fun C0 c = Ext.C0 c ()
+      fun C1 c a = Ext.C1 c a ignore
+      fun data a = Ext.data a ignore
+      val unit = Ext.unit ()
+      fun Y ? = Ext.Y Tie.unit ?
+      fun op --> ab = Ext.--> ab ignore
+      val exn = Ext.exn ()
+      fun regExn a e = Ext.regExn a e ignore
+      fun array a = Ext.array a ignore
+      fun refc a = Ext.refc a ignore
+      fun vector a = Ext.vector a ignore
+      val largeInt = Ext.largeInt ()
+      val largeReal = Ext.largeReal ()
+      val largeWord = Ext.largeWord ()
+      val word8 = Ext.word8 ()
+   (* val word16 = Ext.word16 () (* Word16 not provided by SML/NJ *) *)
+      val word32 = Ext.word32 ()
+      val word64 = Ext.word64 ()
+      fun list a = Ext.list a ignore
+      val bool = Ext.bool ()
+      val char = Ext.char ()
+      val int = Ext.int ()
+      val real = Ext.real ()
+      val string = Ext.string ()
+      val word = Ext.word ()
+   end
+end


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

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/generic.sml	2007-06-07 09:57:22 UTC (rev 5593)
@@ -0,0 +1,65 @@
+(* 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.
+ *)
+
+structure Generic :> EXT_GENERIC = struct
+   (* <-- SML/NJ workaround *)
+   open Basic Fn
+   (* SML/NJ workaround --> *)
+
+   structure Index = struct
+      type ('a, 'x) t = 'x
+      val getT = id
+      val mapT = id
+
+      type ('a, 'x) s = 'x
+      val getS = id
+      val mapS = id
+
+      type ('a, 'k, 'x) p = 'x
+      val getP = id
+      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
+end


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

Deleted: mltonlib/trunk/com/ssh/generic/unstable/detail/lifting.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/lifting.sml	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/lifting.sml	2007-06-07 09:57:22 UTC (rev 5593)
@@ -1,26 +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.
- *)
-
-structure Lifting :> LIFTING = struct
-   (* <-- SML/NJ workaround *)
-   open Fn
-   infixr 4 />
-   (* SML/NJ workaround --> *)
-
-   datatype ('t, 'u) t = IN of {get : 'u -> 't, update : 't UnOp.t -> 'u UnOp.t}
-   fun out (IN t) = t
-
-   val id = IN {get = id, update = id}
-
-   fun get lifting = op o /> #get (out (lifting ()))
-   fun update lifting = #update (out (lifting ()))
-
-   val F = IN {get = Pair.fst, update = Pair.mapFst}
-   val S = IN {get = Pair.snd, update = Pair.mapSnd}
-
-   fun (IN {get = gF, update = uF}) ^ (IN {get = gS, update = uS}) =
-       IN {get = gS o gF, update = uF o uS}
-end

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:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-06-07 09:57:22 UTC (rev 5593)
@@ -5,13 +5,14 @@
  *)
 
 group is
-   ../../generics.sml
-   ../../lifting.sml
-   ../../pair-generics.fun
-   ../../sml-syntax.sml
+   ../../../../../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-lifting.sig
    ../../../public/generic.sig
    ../../../public/generics.sig
-   ../../../public/lifting.sig
-   ../../../../../extended-basis/unstable/basis.cm
+   ../../ext-generic.fun
+   ../../generic.sml
+   ../../generics.sml
+   ../../sml-syntax.sml

Deleted: mltonlib/trunk/com/ssh/generic/unstable/detail/pair-generics.fun
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/pair-generics.fun	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/pair-generics.fun	2007-06-07 09:57:22 UTC (rev 5593)
@@ -1,69 +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.
- *)
-
-functor PairGenerics (structure F : GENERIC
-                      structure S : GENERIC) : GENERIC = struct
-   structure Index = struct
-      type 'a t = 'a F.Index.t * 'a S.Index.t
-      type 'a s = 'a F.Index.s * 'a S.Index.s
-      type ('a, 'b) p = ('a, 'b) F.Index.p * ('a, 'b) S.Index.p
-   end
-
-   local
-      fun mk aIso bIso (a, b) i = (aIso a i, bIso b i)
-   in
-      fun iso        ? = mk F.iso        S.iso        ?
-      fun isoProduct ? = mk F.isoProduct S.isoProduct ?
-      fun isoSum     ? = mk F.isoSum     S.isoSum     ?
-   end
-
-   local
-      fun mk t = Pair.map t o Pair.swizzle
-   in
-      fun op *`  ? = mk (F.*`,  S.*`)  ?
-      fun op +`  ? = mk (F.+`,  S.+`)  ?
-      fun op --> ? = mk (F.-->, S.-->) ?
-   end
-
-   fun T ? = Pair.map (F.T, S.T) ?
-   fun R ? = Pair.map (F.R ?, S.R ?)
-
-   fun C0 ? = (F.C0 ?, S.C0 ?)
-   fun C1 ? = Pair.map (F.C1 ?, S.C1 ?)
-
-   fun Y ? = Tie.tuple2 (F.Y, S.Y) ?
-
-   val exn = (F.exn, S.exn)
-   fun regExn (a, b) emb = (F.regExn a emb ; S.regExn b emb)
-
-   fun tuple  ? = Pair.map (F.tuple,  S.tuple)  ?
-   fun record ? = Pair.map (F.record, S.record) ?
-   fun data   ? = Pair.map (F.data,   S.data)   ?
-
-   fun array ? = Pair.map (F.array, S.array) ?
-   fun refc  ? = Pair.map (F.refc,  S.refc)  ?
-
-   fun vector ? = Pair.map (F.vector, S.vector) ?
-
-   fun list ? = Pair.map (F.list, S.list) ?
-
-   val bool   = (F.bool,   S.bool)
-   val char   = (F.char,   S.char)
-   val int    = (F.int,    S.int)
-   val real   = (F.real,   S.real)
-   val string = (F.string, S.string)
-   val unit   = (F.unit,   S.unit)
-   val word   = (F.word,   S.word)
-
-   val largeInt  = (F.largeInt,  S.largeInt)
-   val largeReal = (F.largeReal, S.largeReal)
-   val largeWord = (F.largeWord, S.largeWord)
-
-   val word8  = (F.word8,  S.word8)
-(* val word16 = (F.word16, S.word16) (* Word16 not provided by SML/NJ *) *)
-   val word32 = (F.word32, S.word32)
-   val word64 = (F.word64, S.word64)
-end

Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.cm
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.cm	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.cm	2007-06-07 09:57:22 UTC (rev 5593)
@@ -7,6 +7,6 @@
 library
    source(-)
 is
+   ../../extended-basis/unstable/basis.cm
    detail/ml/smlnj/unsealed.cm
    public/export.sml
-   ../../extended-basis/unstable/basis.cm

Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-07 09:57:22 UTC (rev 5593)
@@ -23,12 +23,13 @@
          public/generic-index.sig
          public/generic.sig
 
-         public/lifting.sig
-         detail/lifting.sml
+         public/ext-generic-index.sig
+         public/ext-generic.sig
 
-         public/generic-lifting.sig
+         detail/generic.sml
 
-         detail/pair-generics.fun
+         public/ext-generic-fun.sig
+         detail/ext-generic.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:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-06-07 09:57:22 UTC (rev 5593)
@@ -6,20 +6,22 @@
 
 (** == Exported Signatures == *)
 
+signature GENERICS = GENERICS
+
 signature GENERIC = GENERIC
-signature GENERICS = GENERICS
 signature GENERIC_INDEX = GENERIC_INDEX
-signature GENERIC_LIFTING = GENERIC_LIFTING
-signature LIFTING = LIFTING
 
+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
+
 (** == Exported Structures == *)
 
+structure Generic : EXT_GENERIC = Generic
 structure Generics : GENERICS = Generics
-structure Lifting : LIFTING = Lifting
 
 (** == Exported Functors == *)
 
-functor PairGenerics (Arg : sig
-                         structure F : GENERIC
-                         structure S : GENERIC
-                      end) : GENERIC = PairGenerics (Arg)
+functor ExtGeneric (Arg : EXT_GENERIC_DOM) : EXT_GENERIC_COD = ExtGeneric (Arg)

Added: 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:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-fun.sig	2007-06-07 09:57:22 UTC (rev 5593)
@@ -0,0 +1,18 @@
+(* 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


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

Added: mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic-index.sig	2007-06-07 09:57:22 UTC (rev 5593)
@@ -0,0 +1,19 @@
+(* 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_INDEX = sig
+   type ('a, 'x) t
+   val getT : ('a, 'x) t -> 'x
+   val mapT : 'x UnOp.t -> ('a, 'x) t UnOp.t
+
+   type ('a, 'x) s
+   val getS : ('a, 'x) t -> 'x
+   val mapS : 'x UnOp.t -> ('a, 'x) t UnOp.t
+
+   type ('a, 'k, 'x) p
+   val getP : ('a, 'k, 'x) p -> 'x
+   val mapP : 'x UnOp.t -> ('a, 'k, 'x) p UnOp.t
+end


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

Added: mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/ext-generic.sig	2007-06-07 09:57:22 UTC (rev 5593)
@@ -0,0 +1,44 @@
+(* 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 = 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 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 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 largeInt : 'x -> (LargeInt.t, 'x) Index.t
+   val largeReal : 'x -> (LargeReal.t, 'x) Index.t
+   val largeWord : 'x -> (LargeWord.t, 'x) Index.t
+   val word8 : 'x -> (Word8.t, 'x) Index.t
+(* 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 bool : 'x -> (Bool.t, 'x) Index.t
+   val char : 'x -> (Char.t, 'x) Index.t
+   val int : 'x -> (Int.t, 'x) Index.t
+   val real : 'x -> (Real.t, 'x) Index.t
+   val string : 'x -> (String.t, 'x) Index.t
+   val word : 'x -> (Word.t, 'x) Index.t
+end


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

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/generic-lifting.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/generic-lifting.sig	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/generic-lifting.sig	2007-06-07 09:57:22 UTC (rev 5593)
@@ -1,22 +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 liftings of generic functions.
- *)
-signature GENERIC_LIFTING = sig
-   structure Element : GENERIC_INDEX
-   (** The element of the combined type-index. *)
-
-   structure Of : GENERIC_INDEX
-   (** The combined type-index. *)
-
-   val lifting : ('a Element.t, 'a Of.t) Lifting.t Thunk.t
-   (**
-    * The lifting index for lifting operations on values of the element
-    * type to operations on the elements of the combined type.
-    *)
-end

Deleted: mltonlib/trunk/com/ssh/generic/unstable/public/lifting.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/lifting.sig	2007-06-07 09:33:23 UTC (rev 5592)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/lifting.sig	2007-06-07 09:57:22 UTC (rev 5593)
@@ -1,38 +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 combinators for lifting functions on values to functions
- * on the leaf elements of nested structures of pairs.  The user specifies
- * the path to a leaf element of a nested structure of pairs to get a
- * lifting index.
- *)
-signature LIFTING = sig
-   type ('element, 'of) t
-   (** The type of lifting indices. *)
-
-   (** == Lifting Operations == *)
-
-   val get : ('a, 'b) t Thunk.t -> ('a -> 'c) -> 'b -> 'c
-   (** Lift a get operation. *)
-
-   val update : ('a, 'b) t Thunk.t -> 'a UnOp.t -> 'b UnOp.t
-   (** Lift an update operation. *)
-
-   (** == Creating Liftings == *)
-
-   val id : ('a, 'a) t
-   (** The identity lifting. *)
-
-   val F : ('a, 'a * 'b) t
-   (** Choose the first element of a pair. *)
-
-   val S : ('b, 'a * 'b) t
-   (** Choose the second element of a pair. *)
-
-   val ^ : ('m, 'u) t * ('t, 'm) t -> ('t, 'u) t
-   (** Concatenation of paths. *)
-end




More information about the MLton-commit mailing list