summaryrefslogtreecommitdiff
path: root/assignment-13/uFPL.icl
diff options
context:
space:
mode:
authorCamil Staps2018-01-06 21:55:01 +0100
committerCamil Staps2018-01-06 21:55:01 +0100
commitcd9c9901021188761fa5237fc946368f90af1ba2 (patch)
tree7bce3ead5bea3cf4af1ed36f3d19b88c37ab75cf /assignment-13/uFPL.icl
parentContinue iTasks simulator (diff)
Working simulator with running per second
Diffstat (limited to 'assignment-13/uFPL.icl')
-rw-r--r--assignment-13/uFPL.icl2
1 files changed, 1 insertions, 1 deletions
diff --git a/assignment-13/uFPL.icl b/assignment-13/uFPL.icl
index b87538e..129df92 100644
--- a/assignment-13/uFPL.icl
+++ b/assignment-13/uFPL.icl
@@ -241,7 +241,7 @@ evalTrigger (Change (EShared s)) st = case get s.sname st.vars of
Just shr -> Just (False, st)
_ -> Nothing
evalTrigger (EShared s ?= e) st = case get s.sname st.vars of
- Just shr=:{dirty=n} | n > 0 -> eval e st >>= \e -> flip tuple st <$> equals shr.val e
+ Just shr=:{dirty=n} | n > 0 -> eval e st >>= \e -> flip tuple {st & vars=put s.sname {shr & dirty=n-1} st.vars} <$> equals shr.val e
Just shr -> Just (False, st)
_ -> Nothing
where