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 2015-12-04 11:26:03 -05:00
parent e0e5c02926
commit 4389a08a95

View File

@ -52,8 +52,8 @@ annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCatego
appendRemainder (rows, previousIndices) = adjoinRows rows $ contextRows (ends ranges) previousIndices sources appendRemainder (rows, previousIndices) = adjoinRows rows $ contextRows (ends ranges) previousIndices sources
sumRows (rows, previousIndices) child = (rows `adjoinRows` (contextRows (starts childRanges) previousIndices sources) `adjoinRows` childRows sumRows (rows, previousIndices) child = (rows `adjoinRows` (contextRows (starts childRanges) previousIndices sources) `adjoinRows` childRows
, ends childRanges) , ends childRanges)
where where
(childRows, childRanges) = diffToRows child before after (childRows, childRanges) = diffToRows child before after
contextRows :: (Int, Int) -> (Int, Int) -> (String, String) -> [Row] contextRows :: (Int, Int) -> (Int, Int) -> (String, String) -> [Row]
contextRows childIndices previousIndices sources = zipWithMaybe rowFromMaybeRows leftElements rightElements contextRows childIndices previousIndices sources = zipWithMaybe rowFromMaybeRows leftElements rightElements