diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-03-18 09:46:24 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-03-18 09:46:24 -0400 |
commit | 219f0f10568c1a5a2d0e0ac1429d464af95cb669 (patch) | |
tree | 864ffbce4d326a719c9d244ad291f95faf7c2061 /src | |
parent | 7df9e40cc0a85aeb61e4de1a4c584fbe7e13824f (diff) |
Fix soundness bug in Effectize, which lead to missing effects in event handlers
Diffstat (limited to 'src')
-rw-r--r-- | src/effectize.sml | 12 |
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) |