mirror of
https://github.com/github/semantic.git
synced 2024-12-01 09:15:01 +03:00
Use any
This commit is contained in:
parent
b2006ef637
commit
5eece69994
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user