From f10a2cd32f57bb929b5cf235758c99642ba556cd Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 16 Mar 2017 13:34:56 -0400 Subject: [PATCH] Allow the reverse path to add edits. --- src/SES/Myers.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index d130a170d..80d27f33b 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -141,7 +141,7 @@ decompose myers = let ?callStack = popCallStack callStack in case myers of where at :: Vector.Vector a -> Int -> a v `at` i = v Vector.! case direction of { Forward -> i ; Reverse -> length v - succ i } addInBounds :: Vector.Vector a -> Int -> (a -> b) -> [b] -> [b] - addInBounds v i with to = if d /= 0 && i >= 0 && i < length v then addFor direction (with (v `at` i)) to else to + addInBounds v i with to = if (d /= 0 || direction == Reverse) && i >= 0 && i < length v then addFor direction (with (v `at` i)) to else to GetKĀ _ direction (Diagonal k) -> do v <- gets (stateFor direction)