From 2cd1816aa792b01cceded580a509c12e525b081f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 13 Jun 2017 17:58:15 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20re-get=20the=20state=20to=20mod?= =?UTF-8?q?ify=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 8204b73a6..056f993f5 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -102,7 +102,7 @@ runSES eq (EditGraph as bs) -- The upper/right extent of the search region or edit graph, whichever is smaller. moveRightFrom <$> getK v (Diagonal (pred k)) endpoint <- slideFrom from - setK (Diagonal k) endpoint + setK v (Diagonal k) endpoint return endpoint -- | Move downward from a given vertex, inserting the element for the corresponding row. @@ -116,8 +116,8 @@ runSES eq (EditGraph as bs) let (x, script) = v ! k in return (Endpoint x (x - unDiagonal k) script) -- | Update the maximum extent reached and path taken along a given diagonal. - setK k (Endpoint x _ script) = - modify (MyersState . (Array.// [(k, (x, script))]) . unMyersState) + setK v k (Endpoint x _ script) = + put (MyersState (v Array.// [(k, (x, script))])) -- | Slide down any diagonal edges from a given vertex. slideFrom (Endpoint x y script)