1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00

Fix a misaligned guard.

This commit is contained in:
Rob Rix 2016-03-14 14:56:56 -04:00
parent 3742f22eb6
commit 7e631f06d6
2 changed files with 1755 additions and 1 deletions

1754
UI/effects.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -86,7 +86,7 @@ adjoinChildren sources infos constructor children = fmap wrap $ leadingContext <
childLines :: (Copointed c, Functor c, Applicative f, Coalescent (f (Line (Maybe (c a), Range))), Crosswalk f, Foldable f) => f (Source Char) -> c (Adjoined (f (Line (a, Range)))) -> (Adjoined (f (Line (Maybe (c a), Range))), f Int) -> (Adjoined (f (Line (Maybe (c a), Range))), f Int)
-- We depend on source ranges increasing monotonically. If a child invalidates that, e.g. if its a move in a Keyed node, we dont output rows for it in this iteration. (It will still show up in the diff as context rows.) This works around https://github.com/github/semantic-diff/issues/488.
childLines sources child (followingLines, next) | or $ (>) . end <$> childRanges <*> next = (followingLines, next)
| otherwise =
| otherwise =
((placeChildAndRangeInContainer <$> copoint child)
<> sequenceL (fromList . pairWithNothing <$> trailingContextLines)
<> followingLines, start <$> childRanges)