diff options
-rwxr-xr-x | sheet.ml | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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
|