1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00
This commit is contained in:
joshvera 2016-07-26 16:29:46 -04:00
parent b2006ef637
commit 5eece69994

View File

@ -83,10 +83,7 @@ spec = parallel $ do
length listOfLeaves `shouldBe` length listOfDiffLeaves
isIndexedOrFixed :: Patch (Term a annotation) -> Bool
isIndexedOrFixed patch = case unwrap <$> patch of
(Insert syntax) -> isIndexedOrFixed' syntax
(Delete syntax) -> isIndexedOrFixed' syntax
(Replace s1 s2) -> isIndexedOrFixed' s1 || isIndexedOrFixed' s2
isIndexedOrFixed = any isIndexedOrFixed'
isIndexedOrFixed' :: Syntax a f -> Bool
isIndexedOrFixed' syntax = case syntax of