From 85231845871c841089308c9bc92569d36cb548db Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 24 Oct 2017 21:32:12 +0200 Subject: Correction --- sheet.ml | 16 ++++++++-------- 1 file 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 -- cgit v1.2.3