Commit 7b1b7521 authored by Steffen Michels's avatar Steffen Michels

adapt to changes to gDiff

parent f0696c35
......@@ -54,8 +54,8 @@ gDiff{|JSONNode|} x y = case x of
field_diffs =
[let ds = gDiff{|*|} (find k xs) (find k ys) in
{status=if (all (\d->d.status==Common) ds) Common Changed, value=k <+ "=", children=ds} \\ k <- both] ++
[{status=Removed, value=k <+ "=", children=[d]} \\ k <- xonly, d <- remove (find k xs)] ++
[{status=Added, value=k <+ "=", children=[d]} \\ k <- yonly, d <- add (find k ys)]
[{status=OnlyLeft, value=k <+ "=", children=[d]} \\ k <- xonly, d <- remove (find k xs)] ++
[{status=OnlyRight, value=k <+ "=", children=[d]} \\ k <- yonly, d <- add (find k ys)]
with
xkeys = map fst xs
ykeys = map fst ys
......@@ -67,10 +67,10 @@ gDiff{|JSONNode|} x y = case x of
_ -> abort "Unimplemented gDiff for JSONNode\n"
where
add :: a -> [Diff] | gDiff{|*|} a
add x = map (setStatus Added) (gDiff{|*|} x x)
add x = map (setStatus OnlyRight) (gDiff{|*|} x x)
remove :: a -> [Diff] | gDiff{|*|} a
remove x = map (setStatus Removed) (gDiff{|*|} x x)
remove x = map (setStatus OnlyLeft) (gDiff{|*|} x x)
:: ProcessOutput =
{ lines :: ![String]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment