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-10-12 19:26:15 -04:00
parent dfe8648a11
commit f79d04e437

View File

@ -62,6 +62,7 @@ diffFiles parser renderer sourceBlobs = do
Free (info :< _) -> cost <$> info
Pure patch -> uncurry both (fromThese 0 0 (unPatch (cost . extract <$> patch)))
getLabel :: HasField fields Category => CofreeF (Syntax leaf) (Record fields) b -> (Category, Maybe leaf)
getLabel (h :< t) = (category h, case t of
Leaf s -> Just s
_ -> Nothing)