From db563fc3090fed21efa9c8196c4723df800a38c2 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 21 Oct 2018 00:59:38 +0100 Subject: [PATCH] Minor corrections and tweaks --- syndicate/HOWITWORKS.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/syndicate/HOWITWORKS.md b/syndicate/HOWITWORKS.md index 3c4efc0..f6b5135 100644 --- a/syndicate/HOWITWORKS.md +++ b/syndicate/HOWITWORKS.md @@ -288,13 +288,13 @@ cases where handlers are dynamically installed. if selector not in edges then edges[selector] := {} let table = edges[selector] - if class not in edges[selector] then + if class not in table then let (outercache, constmap) = cont let innercache = { v | v ∈ outercache, classof (project v h) = class } - edges[selector][class] := ((innercache, {}), {}) - let node' = edges[selector][class] + table[class] := ((innercache, {}), {}) + let node' = table[class] walk-edge (h ++ [0]) node' 0 0 [s_0, ..., s_i] **Definition.** The `addHandler` procedure installs into an index an @@ -303,7 +303,7 @@ cases where handlers are dynamically installed. sequence of captured values matching existing assertions in the index.[^function-pointer-equality] - addHandler :: Index -> (S × [H×V] × [H]) -> ([V] -> V) -> 1 + addHandler :: Index -> (S × [H×V] × [H]) -> (EventType -> [V] -> V) -> 1 addHandler index k f = let (s, constantMap, captureMap) = k let (_, root) = index @@ -337,7 +337,7 @@ cases where handlers are dynamically installed. **Definition.** The `removeHandler` procedure removes an event handler from an index. - removeHandler :: Index -> (S × [H×V] × [H]) -> ([V] -> V) -> 1 + removeHandler :: Index -> (S × [H×V] × [H]) -> (EventType -> [V] -> V) -> 1 removeHandler index k f = let (s, constantMap, captureMap) = k let (_, root) = index