From 1ed4b683787581aef9be7ce5e1875be823f3b4a2 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 28 Oct 2015 18:45:50 -0400 Subject: [PATCH] Restrict comparisons by category. --- 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 2f9d22e84..3a5489726 100644 --- a/prototype/doubt-difftool/main.swift +++ b/prototype/doubt-difftool/main.swift @@ -80,7 +80,7 @@ func termWithInput(string: String) -> Term? { let arguments = BoundsCheckedArray(array: Process.arguments) if let aString = arguments[1].flatMap(readFile), bString = arguments[2].flatMap(readFile), c = arguments[3], ui = arguments[4] { if let a = termWithInput(aString), b = termWithInput(bString) { - let diff = Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: const(true), cost: Free.sum(Patch.difference)).run(a, b) + let diff = Interpreter(equal: Term.equals(annotation: const(true), leaf: ==), comparable: Interpreter.comparable { $0.extract.categories }, cost: Free.sum(Patch.difference)).run(a, b) let range: Range -> Doubt.JSON = { [ $0.startIndex.JSON,