[MLton-commit] r5261

Vesa Karvonen vesak at mlton.org
Mon Feb 19 04:41:24 PST 2007


Added BinFn.
----------------------------------------------------------------------

A   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm
U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
U   mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U   mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/common.sml
A   mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-fn.sig
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-op.sig

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

Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-fn.sml	2007-02-19 12:41:22 UTC (rev 5261)
@@ -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.
+ *)
+
+structure BinFn :> BIN_FN = struct
+   open BinFn
+   fun map (f, g) = Fn.map (Sq.map f, g)
+end


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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bin-op.sml	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -6,5 +6,5 @@
 
 structure BinOp :> BIN_OP = struct
    open BinOp
-   fun map (b2a, a2b) = Fn.map (Sq.map b2a, a2b)
+   val map = BinFn.map
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bootstrap.sml	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -53,3 +53,4 @@
 structure Iso = struct type ('a, 'b) t = ('a -> 'b) * ('b -> 'a) end
 structure With = struct type ('a, 'b) t = ('a -> 'b) -> 'b end
 structure ShiftOp = struct type 'a t = 'a * Word.t -> 'a end
+structure BinFn = struct type ('a, 'b) t = 'a Sq.t -> 'b end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/sigs.cm	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -20,6 +20,7 @@
    ../../public/data/sum.sig
    ../../public/data/unit.sig
    ../../public/exit.sig
+   ../../public/fn/bin-fn.sig
    ../../public/fn/bin-op.sig
    ../../public/fn/bin-pr.sig
    ../../public/fn/cmp.sig

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -13,6 +13,7 @@
    ../../public/lazy/promise.sig
    ../array-slice.sml
    ../array.sml
+   ../bin-fn.sml
    ../bin-op.sml
    ../bin-pr.sml
    ../bool.sml

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -41,6 +41,11 @@
          basis Fn = bas public/fn/fn.sig detail/fn.sml end
          basis Unit = bas public/data/unit.sig end
          basis Sq = bas public/data/sq.sig detail/sq.sml end
+         basis BinFn = let
+            open Fn Sq
+         in
+            bas public/fn/bin-fn.sig detail/bin-fn.sml end
+         end
          basis UnOp = bas public/fn/un-op.sig detail/un-op.sml end
          basis Thunk = let
             open Fn
@@ -60,7 +65,7 @@
             end
          end
          basis BinOp = let
-            open Fn Sq
+            open BinFn
          in
             bas public/fn/bin-op.sig detail/bin-op.sml end
          end
@@ -204,7 +209,7 @@
          basis ShiftOp = bas public/fn/shift-op.sig end
          basis TextIO = bas public/io/text-io.sig detail/text-io.sml end
 
-         open BinOp BinPr Bool Buffer
+         open BinFn BinOp BinPr Bool Buffer
          open Cmp
          open Effect Emb Exit Exn
          open Fix Fn

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -17,6 +17,7 @@
         "public/fn/fn.sig", "detail/fn.sml",
         "public/data/unit.sig",
         "public/data/sq.sig", "detail/sq.sml",
+        "public/fn/bin-fn.sig", "detail/bin-fn.sml",
         "public/fn/un-op.sig", "detail/un-op.sml",
         "public/fn/thunk.sig", "detail/thunk.sml",
         "public/data/univ.sig", "detail/univ-common.sml", "detail/univ-exn.sml",

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/common.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/common.sml	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/common.sml	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -8,6 +8,7 @@
 
 signature ARRAY = ARRAY
 signature ARRAY_SLICE = ARRAY_SLICE
+signature BIN_FN = BIN_FN
 signature BIN_OP = BIN_OP
 signature BIN_PR = BIN_PR
 signature BOOL = BOOL
@@ -68,6 +69,7 @@
 
 structure Array : ARRAY = Array
 structure ArraySlice : ARRAY_SLICE = ArraySlice
+structure BinFn : BIN_FN = BinFn
 structure BinOp : BIN_OP = BinOp
 structure BinPr : BIN_PR = BinPr
 structure Bool : BOOL = Bool

Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-fn.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-fn.sig	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-fn.sig	2007-02-19 12:41:22 UTC (rev 5261)
@@ -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.
+ *)
+
+(** Utilities for dealing with binary functions. *)
+signature BIN_FN = sig
+   type ('a, 'b) t = 'a Sq.t -> 'b
+   (** Type of binary functions. *)
+
+   val map : ('c -> 'a) * ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
+   (** Change the domain and range of a binary function. *)
+end


Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-fn.sig
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-op.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-op.sig	2007-02-19 12:16:36 UTC (rev 5260)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/bin-op.sig	2007-02-19 12:41:22 UTC (rev 5261)
@@ -1,4 +1,4 @@
-(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+(* Copyright (C) 2006-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.
@@ -6,7 +6,7 @@
 
 (** Utilities for dealing with binary operators. *)
 signature BIN_OP = sig
-   type 'a t = 'a Sq.t -> 'a
+   type 'a t = ('a, 'a) BinFn.t
    (** Type of binary operators (e.g. {+, -, @, ...}). *)
 
    val map : ('b, 'a) Iso.t -> 'a t -> 'b t




More information about the MLton-commit mailing list