From ad217cda68d2674c05f31fdd2af5a6d50433e8f0 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 9 Mar 2017 14:01:52 -0500 Subject: [PATCH] Take an Int instead of a Diagonal. --- src/SES/Myers.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 84ab8b943..0c426e3ff 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -68,10 +68,10 @@ getK :: Direction -> Diagonal -> Myers Endpoint getK direction (Diagonal diagonal) = do MyersState forward backward (Diagonal offset) <- get let v = case direction of { Forward -> forward ; Reverse -> backward } - return $! v `at` Diagonal (offset + diagonal) + return $! v `at` (offset + diagonal) -at :: Vector.Vector Int -> Diagonal -> Endpoint -at v (Diagonal k) = Endpoint (v Vector.! k) 0 +at :: Vector.Vector Int -> Int -> Endpoint +at v k = Endpoint (v Vector.! k) 0 overlaps :: Endpoint -> Endpoint -> Bool overlaps (Endpoint x y) (Endpoint u v) = x - y == u - v && x <= u