From e6c96ed60b92252383dd4de057522ac94a890786 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 4 Dec 2015 10:00:50 -0500 Subject: [PATCH] Wrap indexed `Row`s elements in `Ul` elements. --- src/Split.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Split.hs b/src/Split.hs index a417a7818..d3dff479c 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -44,8 +44,9 @@ annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCatego leftElements = Span (classify leftCategories) <$> lines (substring left before) rightElements = Span (classify rightCategories) <$> lines (substring right after) -annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCategories) (Indexed i)) before after = (snd $ foldl sumRows ((start left, start right), []) i, left, right) +annotatedToRows (Annotated (Info left _ leftCategories, Info right _ rightCategories) (Indexed i)) before after = (bimap (Ul $ classify leftCategories) <$> rows, left, right) where + rows = snd $ foldl sumRows ((start left, start right), []) i sumRows ((previousLeft, previousRight), rows) child = ((end left, end right), rows ++ contextRows ++ childRows) where (childRows, left, right) = diffToRows child before after