From 0a1b3508eeab6389505de11a13b2ad93d75fc167 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 24 Mar 2016 11:32:41 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20iterate=20each=20line=20of=20ea?= =?UTF-8?q?ch=20child.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Alignment.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Alignment.hs b/src/Alignment.hs index a26da2f7b..9f0025bac 100644 --- a/src/Alignment.hs +++ b/src/Alignment.hs @@ -134,8 +134,7 @@ groupChildrenByLine :: Join These [Range] -> [AlignedDiff leaf] -> [Join These ( groupChildrenByLine ranges children = go rangeLists children where rangeLists = these (flip (,) []) ((,) []) (,) (runJoin ranges) go ranges children | (l:ls, r:rs) <- ranges - , ((firstLine:restOfLines):rest) <- children = go ranges (restOfLines:rest) - | ([]:rest) <- children = go ranges rest + , (child:rest) <- children = go ranges rest | otherwise = uncurry (alignWith (fmap (flip (,) []) . Join)) ranges intersects :: Range -> Range -> Bool