From f2c8d7587971bb1bb03e0d6acb5de18e5e519946 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 10 Mar 2016 09:05:16 -0500 Subject: [PATCH] Construct open or closed lines up front. --- src/Alignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Alignment.hs b/src/Alignment.hs index 9e98bd296..520c161e1 100644 --- a/src/Alignment.hs +++ b/src/Alignment.hs @@ -76,7 +76,7 @@ childRanges :: (Copointed c, Applicative f) => f Int -> c [f (Line (a, Range))] childRanges next child = unionLineRangesFrom <$> (rangeAt <$> next) <*> sequenceA (copoint child) linesInRangeOfSource :: Range -> Source Char -> [Line Range] -linesInRangeOfSource range source = pure <$> actualLineRanges range source +linesInRangeOfSource range source = (if openRange source range then Line else Closed) . pure <$> actualLineRanges range source -- | Wrap a list of child terms in a branch. makeBranchTerm :: (Info -> [inTerm] -> outTerm) -> Set.Set Category -> Int -> [(Maybe inTerm, Range)] -> (outTerm, Range)