From d2595b16cbc74e8513aadde75d08ae955a526a02 Mon Sep 17 00:00:00 2001 From: joshvera Date: Thu, 10 Dec 2015 21:13:24 -0500 Subject: [PATCH] just construct a tuple --- src/Split.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Split.hs b/src/Split.hs index 5232becc1..fccc39a8f 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -64,12 +64,13 @@ split diff before after = return . renderHtml . body . (table ! A.class_ (stringValue "diff")) $ toMarkup [ (colgroup colgroupHtml), - tbody . mconcat $ toMarkup <$> ((reverse . snd $ foldl numberRows (0, []) rows) :: [(Int, Row)]) ] + tbody . mconcat $ toMarkup <$> ((reverse $ foldl numberRows [] rows) :: [(Int, Row)]) ] where colgroupHtml :: Html colgroupHtml = (toMarkup [ col ! A.width (stringValue "40"), col, col ! A.width (stringValue "40"), col ]) rows = fst $ diffToRows diff (0, 0) before after - numberRows (count, rows) row = (count + 1, (count + 1, row):rows) + numberRows [] row = [(1, row)] + numberRows rows@((count, _):_) row = (count + 1, row):rows