1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

🔥 patchWithBoth.

This commit is contained in:
Rob Rix 2016-04-01 10:13:37 -04:00
parent 2540e9d207
commit 9c706c05e2

View File

@ -112,10 +112,6 @@ spec = parallel $ do
leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ runBothWith (++) (toString <$> sources))
patchWithBoth (Insert ()) = Insert . snd
patchWithBoth (Delete ()) = Delete . fst
patchWithBoth (Replace () ()) = runBothWith Replace
branch :: annotation -> [Free (Annotated String annotation) patch] -> Free (Annotated String annotation) patch
branch annotation = Free . Annotated annotation . Indexed