summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-03-18 09:46:24 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-03-18 09:46:24 -0400
commit8b0f32ba85c18581cc58f588019fd89517741e0e (patch)
tree864ffbce4d326a719c9d244ad291f95faf7c2061 /src
parent067ef4945e6813a5456f74da2091f068c46bfb57 (diff)
Fix soundness bug in Effectize, which lead to missing effects in event handlers
Diffstat (limited to 'src')
-rw-r--r--src/effectize.sml12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/effectize.sml b/src/effectize.sml
index 03a14ec0..5096a945 100644
--- a/src/effectize.sml
+++ b/src/effectize.sml
@@ -97,13 +97,13 @@ fun effectize file =
case #1 d of
DVal (x, n, t, e, s) =>
let
- val e = dejs e
+ val e' = dejs e
in
- (d, (if couldWrite writers e then
+ (d, (if couldWrite writers e' then
IM.insert (writers, n, (#2 d, s))
else
writers,
- if couldReadCookie readers e then
+ if couldReadCookie readers e' then
IM.insert (readers, n, (#2 d, s))
else
readers,
@@ -117,16 +117,16 @@ fun effectize file =
fun oneRound evs =
foldl (fn ((_, n, _, e, s), (changed, (writers, readers, pushers))) =>
let
- val e = dejs e
+ val e' = dejs e
val (changed, writers) =
- if couldWrite writers e andalso not (IM.inDomain (writers, n)) then
+ if couldWrite writers e' andalso not (IM.inDomain (writers, n)) then
(true, IM.insert (writers, n, (#2 d, s)))
else
(changed, writers)
val (changed, readers) =
- if couldReadCookie readers e andalso not (IM.inDomain (readers, n)) then
+ if couldReadCookie readers e' andalso not (IM.inDomain (readers, n)) then
(true, IM.insert (readers, n, (#2 d, s)))
else
(changed, readers)