[MLton-commit] r4802

Vesa Karvonen vesak at mlton.org
Fri Nov 3 03:24:59 PST 2006


Added call.
----------------------------------------------------------------------

U   mltonlib/trunk/com/ssh/basic/unstable/detail/exit.sml
U   mltonlib/trunk/com/ssh/basic/unstable/public/exit.sig

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

Modified: mltonlib/trunk/com/ssh/basic/unstable/detail/exit.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/exit.sml	2006-11-03 09:57:28 UTC (rev 4801)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/exit.sml	2006-11-03 11:24:54 UTC (rev 4802)
@@ -15,4 +15,6 @@
    end
 
    fun to exit value = raise exit value
+
+   fun call block = within (block o to)
 end

Modified: mltonlib/trunk/com/ssh/basic/unstable/public/exit.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/exit.sig	2006-11-03 09:57:28 UTC (rev 4801)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/exit.sig	2006-11-03 11:24:54 UTC (rev 4802)
@@ -47,4 +47,10 @@
     * This means that {to} doesn't return normally to the caller and can
     * be called from a context of any type.
     *)
+
+   val call : (('a -> 'b) -> 'a) -> 'a
+   (**
+    * Simpler, but less flexibly typed, interface to {within} and {to}.
+    * Specifically, {call f} is equivalent to {within (f o to)}.
+    *)
 end




More information about the MLton-commit mailing list