diff src/mono_util.sml @ 1021:7a4a55e05081

Use call/cc for recv and sleep
author Adam Chlipala <adamc@hcoop.net>
date Sun, 25 Oct 2009 15:29:21 -0400
parents dfe34fad749d
children 217eb87dde31
line wrap: on
line diff
--- a/src/mono_util.sml	Sun Oct 25 14:07:10 2009 -0400
+++ b/src/mono_util.sml	Sun Oct 25 15:29:21 2009 -0400
@@ -368,20 +368,21 @@
                             S.map2 (mft t,
                                   fn t' =>
                                      (EServerCall (s', t', eff), loc)))
-              | ERecv (s, ek, t) =>
+              | ERecv (s, t) =>
                 S.bind2 (mfe ctx s,
                       fn s' =>
-                         S.bind2 (mfe ctx ek,
-                               fn ek' =>
-                                  S.map2 (mft t,
-                                       fn t' =>
-                                          (ERecv (s', ek', t'), loc))))
-              | ESleep (s, ek) =>
-                S.bind2 (mfe ctx s,
+                         S.map2 (mft t,
+                              fn t' =>
+                                 (ERecv (s', t'), loc)))
+              | ESleep s =>
+                S.map2 (mfe ctx s,
                       fn s' =>
-                         S.map2 (mfe ctx ek,
-                               fn ek' =>
-                                  (ESleep (s', ek'), loc)))
+                         (ESleep s', loc))
+
+              | ESpawn s =>
+                S.map2 (mfe ctx s,
+                      fn s' =>
+                         (ESpawn s', loc))
 
         and mfmode ctx mode =
             case mode of