[MLton-commit] r5530

Vesa Karvonen vesak at mlton.org
Wed Apr 18 01:20:46 PDT 2007


Added seal.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/fn.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml	2007-04-17 15:53:36 UTC (rev 5529)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/fn/fn.sml	2007-04-18 08:20:45 UTC (rev 5530)
@@ -13,6 +13,7 @@
    fun id x = x
    fun map (f, g) h = g o h o f
    fun pass x f = f x
+   fun seal f x () = f x
    fun uncurry f (x, y) = f x y
    val op o = op o
    fun op <\ (x, f) y = f (x, y)

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml	2007-04-17 15:53:36 UTC (rev 5529)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export/top-level.sml	2007-04-18 08:20:45 UTC (rev 5530)
@@ -29,6 +29,7 @@
 val flip = Fn.flip
 val id = Fn.id
 val pass = Fn.pass
+val seal = Fn.seal
 val uncurry = Fn.uncurry
 
 val op /> = Fn./>

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/fn.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/fn.sig	2007-04-17 15:53:36 UTC (rev 5529)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/fn/fn.sig	2007-04-18 08:20:45 UTC (rev 5530)
@@ -36,6 +36,12 @@
    val pass : 'a -> ('a -> 'b) -> 'b
    (** Pass to continuation ({pass x f = f x}). *)
 
+   val seal : ('a -> 'b) -> 'a -> 'b Thunk.t
+   (**
+    * {seal f x} is equivalent to {fn () => f x} assuming {f} and {x} are
+    * variables.
+    *)
+
    val <\ : 'a * ('a * 'b -> 'c) -> 'b -> 'c
    (** Left section ({(x <\ f) y = f (x, y)}). *)
 




More information about the MLton-commit mailing list