1
1
mirror of https://github.com/github/semantic.git synced 2024-12-30 18:36:27 +03:00
Commit Graph

637 Commits

Author SHA1 Message Date
Rob Rix
0c06abbe4d Add intersectsFirstLine back in. 2016-05-27 10:07:32 -04:00
Rob Rix
de6d7edec2 Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	semantic-diff.cabal
#	src/Alignment.hs
#	src/Control/Comonad/Cofree.hs
#	src/Data/Adjoined.hs
#	src/Diffing.hs
#	src/Interpreter.hs
#	src/Prologue.hs
#	src/Renderer/JSON.hs
#	src/Renderer/Patch.hs
#	src/Renderer/Split.hs
#	src/SplitDiff.hs
#	src/Term.hs
#	test/AlignmentSpec.hs
#	test/ArbitraryTerm.hs
#	test/PatchOutputSpec.hs
2016-05-27 09:35:26 -04:00
Rob Rix
bcbc28937b Extract intersectsAnyLine to the top level. 2016-05-26 19:18:11 -04:00
Rob Rix
0925285816 Test whether any line intersects. 2016-05-26 19:14:27 -04:00
Rob Rix
da8a911142 🔥 linesOf. 2016-05-26 19:14:17 -04:00
Rob Rix
e72cbd1f60 Revert "Call into linesOf for symmetrically intersecting children."
This reverts commit fc767f00cd8bed7769873b75cd73d2ca2d7edd89.
2016-05-26 16:33:12 -04:00
Rob Rix
606cd3abef Call into linesOf for symmetrically intersecting children. 2016-05-26 16:33:08 -04:00
Rob Rix
9daf310d73 Return the children from linesOf. 2016-05-26 16:32:50 -04:00
Rob Rix
509ef96938 Pull out the line and advance past it alone. 2016-05-26 16:21:53 -04:00
Rob Rix
0b00a34242 Return the next ranges from linesOf. 2016-05-26 16:18:16 -04:00
Rob Rix
c0e54c56f4 Fail fast on no children, too. 2016-05-26 16:05:12 -04:00
Rob Rix
4b2a010e3e Fail fast when we have no ranges. 2016-05-26 16:04:09 -04:00
Rob Rix
d148286cc0 Skip empty children. 2016-05-26 15:41:26 -04:00
Rob Rix
cfe15a5afa Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	src/Alignment.hs
#	src/Control/Comonad/Cofree.hs
#	src/Data/Adjoined.hs
#	src/Data/Align.hs
#	src/Data/Bifunctor/These.hs
#	src/Data/Coalescent.hs
#	src/Data/Copointed.hs
#	src/Data/Functor/Both.hs
#	src/Data/Option.hs
#	src/Line.hs
#	src/Patch.hs
#	src/Range.hs
#	src/Renderer/JSON.hs
#	src/Renderer/Patch.hs
#	src/Renderer/Split.hs
#	src/SplitDiff.hs
#	stack.yaml
#	test/AlignmentSpec.hs
#	test/CorpusSpec.hs
#	test/Data/Adjoined/Spec.hs
#	test/Data/Functor/Both/Spec.hs
2016-05-26 15:25:45 -04:00
Rob Rix
69fd24c415 Temporarily commit a tracing log about exhausting the ranges with children still remaining. 2016-05-26 14:58:20 -04:00
Rob Rix
2801949859 Add a function computing the lines of all children intersecting given ranges. 2016-05-26 14:57:51 -04:00
Rob Rix
e5506b278f advancePast takes a list of lines to advance past. 2016-05-26 14:56:53 -04:00
Rob Rix
d1ccd93002 Extract advancePast to the top level. 2016-05-26 14:49:57 -04:00
Rob Rix
281b65e70a Extract a function to compute the head ranges of a pair of lists of ranges. 2016-05-26 14:49:41 -04:00
joshvera
473ec980b1 Merge remote-tracking branch 'origin/master' into diff-summaries 2016-05-26 13:40:54 -04:00
joshvera
8180b37285 Use Protolude via the Prologue module and add NoImplicitPrelude 2016-05-26 12:58:04 -04:00
Rob Rix
31519322bc Simplify by 🔥ing the impossible case and making the no-symmetrical-child case a catch-all. 2016-05-26 11:15:28 -04:00
Rob Rix
4985856d39 O(1) concatenation. 2016-05-26 11:05:48 -04:00
Rob Rix
07ba502d1d Partition the intersecting children instead of expecting them to be strictly ordered. 2016-05-26 10:11:44 -04:00
Rob Rix
d821349e75 Partition the children instead of expecting them to be strictly ordered. 2016-05-26 10:11:22 -04:00
Rob Rix
b6fcf7c3aa Filter the list of children in lineAndRemainingWhere. 2016-05-26 10:02:14 -04:00
Rob Rix
561f790b12 Move the any back into lineAndRemainingWhere. 2016-05-26 10:02:01 -04:00
Rob Rix
e5a2c384fc Test that alignBranch covers every line of the input ranges. 2016-05-25 11:13:34 -04:00
Rob Rix
c6a53fb5c0 Drop empty children first. 2016-05-25 10:28:56 -04:00
Rob Rix
a2952307f6 Produce a single element with the rest of the lines in a split-up child. 2016-05-20 11:09:15 -04:00
Rob Rix
d99e4ab39b When we only have ranges on one side, default the other to assume intersecting. 2016-05-19 16:51:33 -04:00
Rob Rix
f1d9cc3f2f Skip past nonintersecting children.
This resolves failures in two distinct cases where changing the default
for handling asymmetrical ranges had opposite outcomes.
2016-05-19 16:16:15 -04:00
Rob Rix
2fa8060a1c Revert "Default the intersection assumption to True."
This reverts commit 9bf8bb93f3ddf06027e9aafd7b7062b398c5409f.
2016-05-19 16:13:43 -04:00
Rob Rix
16b1d5b4f3 Handle the empty child case with otherwise. 2016-05-19 16:12:51 -04:00
Rob Rix
0fd78af15e 🔥 the properties, since we’ve captured them. 2016-05-19 15:12:24 -04:00
Rob Rix
c839a434e8 🔥 distribute. 2016-05-19 13:43:02 -04:00
Rob Rix
bf656592c1 🔥 pairRangesWithLine. 2016-05-19 13:42:58 -04:00
Rob Rix
f4923c63b7 🔥 spanAndSplitFirstLines. 2016-05-19 13:42:53 -04:00
Rob Rix
73746013fb 🔥 alignChildrenInRanges. 2016-05-19 13:42:46 -04:00
Rob Rix
20627f764f Test alignBranch instead of alignChildrenInRanges. 2016-05-19 13:40:10 -04:00
Rob Rix
572082cacd Diff Keyed nodes using alignBranch. 2016-05-19 13:38:24 -04:00
Rob Rix
64ac903f3f Align branches within a copointed context. 2016-05-19 13:26:36 -04:00
Rob Rix
17d2e8fe62 Default the intersection assumption to True.
This fixes an issue where we dropped asymmetrical children on the
opposite side from earlier asymmetrical children when splitting up
deletions/insertions.
2016-05-19 12:39:43 -04:00
Rob Rix
4f13339838 🔥 some redundant bits of the comments. 2016-05-19 00:23:04 -04:00
Rob Rix
99d0496d72 Use first/second to advance asymmetrically before symmetrical children. 2016-05-18 17:22:02 -04:00
Rob Rix
78323c8183 Swap the order of the arguments to alignChildren. 2016-05-18 16:19:40 -04:00
Rob Rix
59ca7fd08b Fix a missing bracket in a comment.
This was making bracket-matcher sad.
2016-05-18 16:15:44 -04:00
Rob Rix
a92f55a053 alignChildren returns the remaining children in the nonintersecting case. 2016-05-18 16:06:15 -04:00
Rob Rix
bb38c87015 Reformat alignChildren’s cases. 2016-05-18 16:03:37 -04:00
Rob Rix
a5960a164f Factor the recursive call of alignChildren into its where clause. 2016-05-18 16:02:38 -04:00