From 9dba0887c850f9c702397307756a280b489a722e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Dec 2015 22:37:38 -0500 Subject: [PATCH] Remove the local contextLines binding from splitAnnotatedByLines. --- src/Split.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Split.hs b/src/Split.hs index 003fcb81e..485cb8d2d 100644 --- a/src/Split.hs +++ b/src/Split.hs @@ -184,8 +184,7 @@ termToLines (Info range categories :< syntax) source = (rows syntax, range) splitAnnotatedByLines :: (String, String) -> (Range, Range) -> (Set.Set Category, Set.Set Category) -> Syntax a (Diff a Info) -> [Row (Term a Info)] splitAnnotatedByLines sources ranges categories syntax = case syntax of Leaf a -> contextRows (Leaf a) ranges categories sources - where contextLines constructor range categories source = Line False . (:[]) . (:< constructor) . (`Info` categories) <$> actualLineRanges range source - contextRows constructor ranges categoriess sources = zipWithDefaults Row EmptyLine EmptyLine (contextLines (Leaf a) (fst ranges) (fst categories) (fst sources)) (contextLines (Leaf a) (snd ranges) (snd categories) (snd sources)) + where contextRows constructor ranges categoriess sources = zipWithDefaults Row EmptyLine EmptyLine (contextLines (Leaf a) (fst ranges) (fst categories) (fst sources)) (contextLines (Leaf a) (snd ranges) (snd categories) (snd sources)) adjoin = reverse . foldl (adjoinRowsBy (openTerm $ fst sources) (openTerm $ snd sources)) []