From b6d59ff7ef2e00a2faddec1c4f6d708e7fa9e216 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 5 Nov 2015 17:26:14 -0500 Subject: [PATCH] Refine leaves in the output diff. --- prototype/doubt-difftool/main.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prototype/doubt-difftool/main.swift b/prototype/doubt-difftool/main.swift index 78e0552ac..fd9e3313b 100644 --- a/prototype/doubt-difftool/main.swift +++ b/prototype/doubt-difftool/main.swift @@ -172,7 +172,7 @@ let parser = parserForType(aSource.type) let a = try benchmark("parsing source a") { try parser(aSource.contents) } let b = try benchmark("parsing source b") { try parser(bSource.contents) } -let diff = benchmark("diffing") { Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: Interpreter.comparable { $0.extract.categories }, cost: Free.sum(Patch.sum)).run(a, b) } +let diff = benchmark("diffing") { Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: Interpreter.comparable { $0.extract.categories }, cost: Free.sum(Patch.sum)).run(a, b).flatMap(refineLeafReplacement(aSource.contents, bSource.contents)) } switch arguments.output { case .Split: let JSON: Doubt.JSON = [