1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

Simplify leafWithRangesInSources.

This commit is contained in:
Rob Rix 2016-03-03 15:33:31 -05:00
parent b6044e788e
commit 7a71b76d99

View File

@ -117,7 +117,7 @@ spec = parallel $ do
combineIntoLeaves (leaves, start) char = (leaves ++ [ Free $ Annotated (Info <$> (pure (Range start $ start + 1)) <*> mempty) (Leaf [ char ]) ], start + 1)
leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ toList (fst sources) ++ toList (snd sources))
leafWithRangesInSources sources ranges = Free $ Annotated (Info <$> ranges <*> pure mempty) (Leaf $ runBothWith (++) (toList <$> sources))
patchWithBoth (Insert ()) = Insert . snd
patchWithBoth (Delete ()) = Delete . fst