[MLton-commit] r6412

Vesa Karvonen vesak at mlton.org
Fri Feb 15 03:22:15 PST 2008


Decided to swap the direction of contract composition with andAlso.  This
means that at covariant positions contract composition with andAlso works
like the built-in andalso in the sense that the left hand side contract is
asserted first.

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

U   mltonlib/trunk/com/ssh/extended-basis/unstable/detail/debug/contract.sml
U   mltonlib/trunk/com/ssh/extended-basis/unstable/public/debug/contract.sig

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

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/debug/contract.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/debug/contract.sml	2008-02-15 00:52:21 UTC (rev 6411)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/debug/contract.sml	2008-02-15 11:22:14 UTC (rev 6412)
@@ -22,5 +22,5 @@
                 fn e as Caller _ => raise e
                  | e as Callee _ => raise e
                  | e             => raise Caller e)
-   val op andAlso = op o
+   fun op andAlso (a, b) = b o a
 end

Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/debug/contract.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/debug/contract.sig	2008-02-15 00:52:21 UTC (rev 6411)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/debug/contract.sig	2008-02-15 11:22:14 UTC (rev 6412)
@@ -139,6 +139,6 @@
     *
     * The output from the example is:
     *
-    *> D1C1D2C2R2R1
+    *> D2C2D1C1R1R2
     *)
 end




More information about the MLton-commit mailing list