aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-10-24 21:32:12 +0200
committerSébastien Dailly <sebastien@chimrod.com>2017-10-24 21:32:12 +0200
commit85231845871c841089308c9bc92569d36cb548db (patch)
treec33537da40b6e12532881408da2de78c21c23793
parenteb39d3c525670d4107adb7b4d32551e0eb97941a (diff)
Correction
-rwxr-xr-xsheet.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/sheet.ml b/sheet.ml
index 24326e8..a17c08c 100755
--- a/sheet.ml
+++ b/sheet.ml
@@ -95,27 +95,27 @@ module Raw = struct
if content.value = cycle_error then
(* The content has already been update, do not process it again *)
- (Cell.Set.empty, succ, t)
+ (parents, succ, t)
else
- let t = Map.add element { content with value = cycle_error} t
+ let t = Map.add element { content with value = cycle_error } t
and set_error cell content t =
if content.value = cycle_error then
None
else
- Some (Map.add cell { content with value = cycle_error} t)
+ Some (Map.add cell { content with value = cycle_error } t)
and succ = Cell.Set.add element succ in
let succ, t = traverse set_error content (succ, t) in
- (Cell.Set.empty, succ, t)
+ (parents, succ, t)
) else (
begin match f element content t with
| None ->
(* The content does not change, we do not update the successors *)
- (Cell.Set.empty, succ, t)
+ (init, succ, t)
| Some t' ->
- let parents' = Cell.Set.add element parents in
- let succ' = Cell.Set.add element succ in
+ let parents' = Cell.Set.add element parents
+ and succ' = Cell.Set.add element succ in
if (Cell.Set.is_empty content.sink) then
- (Cell.Set.empty, succ', t')
+ (init, succ', t')
else
Cell.Set.fold successors content.sink (parents', succ', t')
end