[MLton-commit] r5633

Vesa Karvonen vesak at mlton.org
Sat Jun 16 08:50:06 PDT 2007


Stub for generic pickle/unpickle function.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm
A   mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
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/value/pickle.sig

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

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-16 15:11:54 UTC (rev 5632)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/ml/smlnj/unsealed.cm	2007-06-16 15:50:06 UTC (rev 5633)
@@ -22,6 +22,7 @@
    ../../../public/value/eq.sig
    ../../../public/value/hash.sig
    ../../../public/value/ord.sig
+   ../../../public/value/pickle.sig
    ../../../public/value/pretty.sig
    ../../../public/value/type-info.sig
    ../../close-generic.fun
@@ -36,6 +37,7 @@
    ../../value/eq.sml
    ../../value/hash.sml
    ../../value/ord.sml
+   ../../value/pickle.sml
    ../../value/pretty.sml
    ../../value/type-info.sml
    ../../with-extra.fun

Added: mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml	2007-06-16 15:11:54 UTC (rev 5632)
+++ mltonlib/trunk/com/ssh/generic/unstable/detail/value/pickle.sml	2007-06-16 15:50:06 UTC (rev 5633)
@@ -0,0 +1,25 @@
+(* 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 WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_GENERIC = struct
+   (* <-- SML/NJ workaround *)
+   open TopLevel
+   infix  7 *`
+   infix  6 +`
+   infix  4 <\ \>
+   infixr 4 </ />
+   infix  2 >| andAlso
+   infixr 2 |<
+   infix  1 orElse >>=
+   infix  0 &
+   infixr 0 -->
+   (* SML/NJ workaround --> *)
+
+   open Arg
+   structure Pickle = Rep
+   val pickle = undefined
+   val unpickle = undefined
+end


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

Modified: mltonlib/trunk/com/ssh/generic/unstable/lib.mlb
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-16 15:11:54 UTC (rev 5632)
+++ mltonlib/trunk/com/ssh/generic/unstable/lib.mlb	2007-06-16 15:50:06 UTC (rev 5633)
@@ -66,14 +66,17 @@
          public/value/eq.sig
          detail/value/eq.sml
 
+         public/value/hash.sig
+         detail/value/hash.sml
+
          public/value/ord.sig
          detail/value/ord.sml
 
+         public/value/pickle.sig
+         detail/value/pickle.sml
+
          public/value/pretty.sig
          detail/value/pretty.sml
-
-         public/value/hash.sig
-         detail/value/hash.sml
       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-16 15:11:54 UTC (rev 5632)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/export.sml	2007-06-16 15:50:06 UTC (rev 5633)
@@ -36,6 +36,9 @@
 signature ORD = ORD
 signature ORD_GENERIC = ORD_GENERIC
 
+signature PICKLE = PICKLE
+signature PICKLE_GENERIC = PICKLE_GENERIC
+
 signature PRETTY = PRETTY
 signature PRETTY_GENERIC = PRETTY_GENERIC
 
@@ -107,6 +110,9 @@
 
 functor WithOrd (Arg : OPEN_GENERIC) : ORD_GENERIC = WithOrd (Arg)
 
+signature WITH_PICKLE_DOM = WITH_PICKLE_DOM
+functor WithPickle (Arg : WITH_PICKLE_DOM) : PICKLE_GENERIC = WithPickle (Arg)
+
 functor WithPretty (Arg : OPEN_GENERIC) : PRETTY_GENERIC = WithPretty (Arg)
 
 functor WithTypeInfo (Arg : OPEN_GENERIC) : TYPE_INFO_GENERIC =

Added: mltonlib/trunk/com/ssh/generic/unstable/public/value/pickle.sig
===================================================================
--- mltonlib/trunk/com/ssh/generic/unstable/public/value/pickle.sig	2007-06-16 15:11:54 UTC (rev 5632)
+++ mltonlib/trunk/com/ssh/generic/unstable/public/value/pickle.sig	2007-06-16 15:50:06 UTC (rev 5633)
@@ -0,0 +1,28 @@
+(* 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 a generic pickle/unpickle function.
+ *)
+signature PICKLE = sig
+   structure Pickle : OPEN_GENERIC_REP
+
+   val pickle : ('a, 'x) Pickle.t -> (Char.t, 'b) Writer.t -> ('a, 'b) Writer.t
+   (** Extracts the pickling function. *)
+
+   val unpickle : ('a, 'x) Pickle.t -> (Char.t, 'b) Reader.t -> ('a, 'b) Reader.t
+   (** Extracts the unpickling function. *)
+end
+
+signature PICKLE_GENERIC = sig
+   include OPEN_GENERIC PICKLE
+   sharing Rep = Pickle
+end
+
+signature WITH_PICKLE_DOM = sig
+   include OPEN_GENERIC EQ HASH TYPE_INFO
+   sharing Rep = Eq = Hash = TypeInfo
+end


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




More information about the MLton-commit mailing list