From da5807180a80db40854f66afa12ab807c15982e5 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 18 Nov 2015 11:13:13 -0800 Subject: [PATCH] =?UTF-8?q?If=20not=20comparable,=20don=E2=80=99t=20compar?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Interpreter.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index f46078a23..24cefb762 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -11,6 +11,7 @@ import Patch import SES constructAndRun :: Eq a => Comparable a -> Term a Info -> Term a Info -> Maybe (Diff a) +constructAndRun comparable a b | not $ comparable a b = Nothing constructAndRun comparable a b = run comparable $ algorithm a b where algorithm (_ :< Indexed a) (_ :< Indexed b) = Free $ ByIndex a b (Pure . Free . Indexed)