mirror of
https://github.com/github/semantic.git
synced 2024-12-19 12:51:52 +03:00
Generalize diffSummary over records.
This commit is contained in:
parent
13d2dfc24f
commit
f51b1724fe
@ -116,7 +116,7 @@ instance Show (DiffSummary DiffInfo) where
|
||||
then ""
|
||||
else " in the " <> intercalate "/" (toCategoryName <$> parentAnnotations) <> " context"
|
||||
|
||||
diffSummary :: HasCategory leaf => Diff leaf Info -> [DiffSummary DiffInfo]
|
||||
diffSummary :: (HasCategory leaf, HasField fields Category) => Diff leaf (Record fields) -> [DiffSummary DiffInfo]
|
||||
diffSummary = cata $ \case
|
||||
-- Skip comments and leaves since they don't have any changes
|
||||
(Free (_ :< Leaf _)) -> []
|
||||
|
Loading…
Reference in New Issue
Block a user