1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 08:54:07 +03:00

Stub in recursive diffing to always replace.

This commit is contained in:
Rob Rix 2015-11-17 17:29:12 -08:00
parent 485e947da6
commit a30328e682

View File

@ -13,6 +13,8 @@ constructAndRun a b =
run :: Algorithm a (Diff a) -> Maybe (Diff a)
run (Pure diff) = Just diff
run (Free (Recursive a b f)) = recur a b where
recur _ _ = run $ f $ Pure Patch { old = Just a, new = Just b }
interpret :: Term a Info -> Term a Info -> Diff a
interpret a b = maybeReplace $ constructAndRun a b where