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:
parent
4e24b26440
commit
090635cd59
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user