[MLton-commit] r6505

Vesa Karvonen vesak at mlton.org
Tue Mar 25 04:42:09 PST 2008


Changed let-in-end -> case-of.

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

U   mltonlib/trunk/org/mlton/vesak/toys/chameneos/async/chameneos.sml

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

Modified: mltonlib/trunk/org/mlton/vesak/toys/chameneos/async/chameneos.sml
===================================================================
--- mltonlib/trunk/org/mlton/vesak/toys/chameneos/async/chameneos.sml	2008-03-25 12:29:16 UTC (rev 6504)
+++ mltonlib/trunk/org/mlton/vesak/toys/chameneos/async/chameneos.sml	2008-03-25 12:42:08 UTC (rev 6505)
@@ -35,12 +35,11 @@
            | {waiter = NONE, done = d, quota = q} =>
              (MVar.fill mp {waiter = SOME color, done = d, quota = q}
             ; when (MVar.take wake) (arrive (tally+1)))
-           | {quota = q, waiter = SOME color0, done = d} => let
-                val color = compl (color & color0)
-             in MVar.fill wake color
-              ; MVar.fill mp {quota = q-1, waiter = NONE, done = d}
-              ; arrive (tally+1) color
-             end)
+           | {quota = q, waiter = SOME color0, done = d} =>
+             case compl (color & color0)
+              of color => (MVar.fill wake color
+                         ; MVar.fill mp {quota = q-1, waiter = NONE, done = d}
+                         ; arrive (tally+1) color))
 
 val n = valOf (Int.fromString (hd (CommandLine.arguments ()))) handle _ => 1
 




More information about the MLton-commit mailing list