mirror of
https://github.com/github/semantic.git
synced 2025-01-03 13:02:37 +03:00
Use the Foldable instance instead of specifying the constructor.
This commit is contained in:
parent
27cc162e1c
commit
cb71ba3467
@ -38,4 +38,4 @@ spec = parallel $ do
|
||||
(childrenOf <$> beforeTerm diff, childrenOf <$> afterTerm diff) `shouldBe` (Just (Set.fromList tas), Just (Set.fromList tbs))
|
||||
|
||||
childrenOf :: (Ord leaf, Ord annotation) => Term leaf annotation -> Set.Set (Term leaf annotation)
|
||||
childrenOf term = let Indexed children = unwrap term in Set.fromList children
|
||||
childrenOf term = Set.fromList (toList (unwrap term))
|
||||
|
Loading…
Reference in New Issue
Block a user