1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

add a Monoid instance for Line

This commit is contained in:
joshvera 2015-12-04 15:54:03 -05:00
parent 4e24b26440
commit 090635cd59

View File

@ -48,6 +48,10 @@ diffToRows (Pure (Delete term)) (_, previousIndex) before _ = (rowWithDeletedLin
data Line = Line [HTML] deriving (Show, Eq)
instance Monoid Line where
mempty = Line []
mappend (Line xs) (Line ys) = Line (xs <> ys)
termToLines :: Term a Info -> String -> ([Line], Range)
termToLines (Info range _ categories :< syntax) source = (rows syntax, range)
where