summaryrefslogtreecommitdiff
path: root/src/mono_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-10-25 15:29:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-10-25 15:29:21 -0400
commit2385b6b946eb1215d75a3dddccb05aaf8f605ba3 (patch)
treee7763596f996cbc602dfbefff837b20da643bbba /src/mono_util.sml
parent5a88b41a6655f601c989ae94ce1fc8bb391ca630 (diff)
Use call/cc for recv and sleep
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r--src/mono_util.sml23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml
index 24024470..f8e45dc3 100644
--- a/src/mono_util.sml
+++ b/src/mono_util.sml
@@ -368,20 +368,21 @@ fun mapfoldB {typ = fc, exp = fe, bind} =
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' =>
+ (ESleep s', loc))
+
+ | ESpawn s =>
+ S.map2 (mfe ctx s,
fn s' =>
- S.map2 (mfe ctx ek,
- fn ek' =>
- (ESleep (s', ek'), loc)))
+ (ESpawn s', loc))
and mfmode ctx mode =
case mode of