1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Stub in an LCS command.

This commit is contained in:
Rob Rix 2017-03-10 11:44:35 -05:00
parent fb7bdef523
commit 3885f2df11

View File

@ -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))