From 3885f2df11b74547dc196af4d87508c6a889070a Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 10 Mar 2017 11:44:35 -0500 Subject: [PATCH] Stub in an LCS command. --- src/SES/Myers.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index a2a637ad1..6e9969a9e 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -8,6 +8,7 @@ import Prologue hiding (for, State) data MyersF a where SES :: EditGraph a -> MyersF [These a a] + LCS :: EditGraph a -> MyersF [a] MiddleSnake :: EditGraph a -> MyersF (Snake, EditDistance) FindDPath :: EditGraph a -> Direction -> EditDistance -> Diagonal -> MyersF Endpoint @@ -44,6 +45,10 @@ runMyersStep state step = case step of decompose :: MyersF a -> Myers a decompose myers = case myers of + LCS graph + | null (as graph) || null (bs graph) -> return [] + | otherwise -> return [] + SES graph | null (bs graph) -> return (This <$> toList (as graph)) | null (as graph) -> return (That <$> toList (bs graph))