1
1
mirror of https://github.com/github/semantic.git synced 2025-01-02 04:10:29 +03:00

DiffSummary’s type parameter is no longer phantom.

This commit is contained in:
Rob Rix 2016-05-31 16:11:11 -04:00
parent f1b4529ad1
commit f8ae53d2df

View File

@ -49,11 +49,11 @@ instance HasCategory leaf => HasCategory (Term leaf Info) where
toCategoryName = toCategoryName . toCategory . extract
data DiffSummary a = DiffSummary {
patch :: Patch DiffInfo,
parentAnnotations :: [DiffInfo]
patch :: Patch a,
parentAnnotations :: [a]
} deriving (Eq, Functor)
instance Show a => Show (DiffSummary a) where
instance Show (DiffSummary DiffInfo) where
showsPrec _ DiffSummary{..} s = (++s) $ case patch of
(Insert termInfo) -> "Added the " ++ "'" ++ fromJust (termName termInfo) ++ "' " ++ categoryName termInfo
++ maybeParentContext parentAnnotations