From e26dbb1fbede0774e5669742bd623445bda40bef Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Nov 2015 17:34:04 -0800 Subject: [PATCH] Recur through indexed terms of equal length. --- src/Interpreter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Interpreter.hs b/src/Interpreter.hs index 1989dabdd..505e8d1ac 100644 --- a/src/Interpreter.hs +++ b/src/Interpreter.hs @@ -16,7 +16,7 @@ run :: Algorithm a (Diff a) -> Maybe (Diff a) run (Pure diff) = Just diff run (Free (Recursive a b f)) = recur a b where recur (_ :< Indexed a') (_ :< Indexed b') | length a' == length b' = - run $ f $ Pure Patch { old = Just a, new = Just b } + run $ f $ Free $ Indexed $ zipWith interpret a' b' recur _ _ = run $ f $ Pure Patch { old = Just a, new = Just b } interpret :: Term a Info -> Term a Info -> Diff a