diff options
Diffstat (limited to 'src/diff.ml')
| -rw-r--r-- | src/diff.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/diff.ml b/src/diff.ml index 6a87d93..80c3654 100644 --- a/src/diff.ml +++ b/src/diff.ml @@ -51,7 +51,7 @@ let update_path path left_opt right_opt = module type Place = sig type t - val diff_func : ?recurse:bool -> string list -> t -> change -> t + val diff_func : ?descent:bool -> string list -> t -> change -> t end module Diff (P: Place) = struct @@ -62,12 +62,12 @@ module Diff (P: Place) = struct | Some _, None -> P.diff_func path res Subtracted | None, Some _ -> P.diff_func path res Added | Some left_node, Some right_node when left_node = right_node -> - P.diff_func ~recurse:true path res Unchanged + P.diff_func ~descent:true path res Unchanged | Some left_node, Some right_node when left_node ^~ right_node -> let values = (data_of right_node).values in P.diff_func path res (Updated values) | Some left_node, Some right_node -> - let ret = P.diff_func ~recurse:false path res Unchanged in + let ret = P.diff_func ~descent:false path res Unchanged in List.fold_left (diff_calc path) ret (opt_zip left_node right_node) let diff (init: P.t) l r = diff_calc [] init (Option.some l, Option.some r) |
