1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
Commit Graph

715 Commits

Author SHA1 Message Date
Rob Rix
9b6f3f181c Revert "Align within an Alternative context."
This reverts commit d656d819158b3a31c874a8393757fde6f5deca6e.
2016-04-15 13:00:42 -04:00
Rob Rix
8949bc8a27 Align within an Alternative context. 2016-04-15 12:46:28 -04:00
Rob Rix
ffecacadab Rename catThese to unionThese. 2016-04-15 12:45:33 -04:00
Rob Rix
c54924f3ea Define catThese over Alternative Foldable functors. 2016-04-15 12:44:04 -04:00
Rob Rix
2974e5f42d Correct catThese. 2016-04-15 12:38:17 -04:00
Rob Rix
23f487ae35 Union wraps Join These. 2016-04-15 12:15:47 -04:00
Rob Rix
7c8354f862 Revert "Hide Alt."
This reverts commit a43afb89898b918c06834e92ade43113e74fd35f.
2016-04-15 11:57:26 -04:00
Rob Rix
7fa9fa1238 Hide Alt. 2016-04-15 11:28:43 -04:00
Rob Rix
e52f5c9b4c Simplfiy catThese slightly. 2016-04-15 11:06:11 -04:00
Rob Rix
d82931a5f5 Don’t map Keyed children into lists. 2016-04-15 10:01:50 -04:00
Rob Rix
e316da1b88 Abstract the Alignment machinery over a Foldable instance. 2016-04-15 10:00:42 -04:00
Rob Rix
5ec7f6cc77 This case no longer arises. 2016-04-15 10:00:21 -04:00
Rob Rix
169dbea2a5 Use the local this/that bindings. 2016-04-15 09:37:01 -04:00
Rob Rix
ff54948c7b 📝 intersects. 2016-04-15 09:35:41 -04:00
Rob Rix
012425b11a Move intersectsRange to Range. 2016-04-15 09:34:34 -04:00
Rob Rix
e0f6c2ae2d splitThese returns its results in Maybe.
The uses of fromJust are as bad as the use of head, unfortunately.
2016-04-15 09:33:30 -04:00
Rob Rix
88d6fc08d4 Rename split → splitThese. 2016-04-15 09:31:43 -04:00
Rob Rix
940ad0ac82 📝 split. 2016-04-15 09:31:28 -04:00
Rob Rix
c585ca95d6 📝 modifyJoin. 2016-04-15 09:30:20 -04:00
Rob Rix
5e5e9fe7c8 🔥 the separate apThese function. 2016-04-15 09:29:23 -04:00
Rob Rix
8b3833b7ff 📝 Union. 2016-04-15 09:27:41 -04:00
Rob Rix
7ceaea76c8 Group the instances at the bottom. 2016-04-15 09:26:16 -04:00
Rob Rix
056b9647e8 🔥 Row. 2016-04-15 09:25:27 -04:00
Rob Rix
d7ed0bc74d Move the Union newtype up. 2016-04-15 09:23:41 -04:00
Rob Rix
ac26367e2d Rephrase the advance function in terms of catThese. 2016-04-14 22:23:26 -04:00
Rob Rix
a61d847705 Replace Data.Bifunctor.These and Data.Align with the these package. 2016-04-14 22:00:00 -04:00
Rob Rix
84abff8773 Move the extras atop These into Alignment. 2016-04-14 21:47:18 -04:00
Rob Rix
6662deac2b 🔥 the old split… code paths. 2016-04-14 21:16:10 -04:00
Rob Rix
3235cfee3a Define renderers in terms of alignDiff. 2016-04-14 21:16:02 -04:00
Rob Rix
7c63e92ea7 Construct SplitPatches. 2016-04-14 20:27:24 -04:00
Rob Rix
3e1072f714 Use record syntax to update info. 2016-04-14 19:40:49 -04:00
Rob Rix
0142a54dcf Move the getRange function to SplitDiff. 2016-04-14 18:36:09 -04:00
Rob Rix
c955c94729 Move alignDiff up. 2016-04-14 17:03:53 -04:00
Rob Rix
ad4d1ab9e4 Pair with the ranges appropriate for the intersecting elements.
This is gross.
2016-04-14 16:34:49 -04:00
Rob Rix
8052414634 Parens I guess. 2016-04-14 13:31:07 -04:00
Rob Rix
919fab9053 Reformat alignChildrenInRanges for less indentation. 2016-04-14 13:19:18 -04:00
Rob Rix
23cca50048 Rename group2 to alignChildrenInRanges. 2016-04-14 13:18:19 -04:00
Rob Rix
ce33d56086 🔥 a redundant blank line. 2016-04-14 13:15:27 -04:00
Rob Rix
e3ace6408c Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	test/AlignmentSpec.hs
#	test/PatchOutputSpec.hs
2016-04-14 12:57:45 -04:00
Rob Rix
8c9a9c7586 🔥 mask. 2016-04-14 12:46:25 -04:00
Rob Rix
1656f93f65 🔥 spanThese. 2016-04-14 12:46:05 -04:00
Rob Rix
8a781d0edf 🔥 unconsThese. 2016-04-14 12:16:45 -04:00
Rob Rix
5a80999a1f Rearrange/rename the bindings a little. 2016-04-14 12:13:41 -04:00
Rob Rix
e5a3683c72 Implement applyThese in terms of apThese. 2016-04-14 12:08:37 -04:00
Rob Rix
17728c5f6d Implement catThese in terms of Union. 2016-04-14 12:05:52 -04:00
Rob Rix
ec4ff0cf14 Use catThese to merge lines. 2016-04-14 11:54:58 -04:00
Rob Rix
df898f3489 Rename mergeThese to catThese. 2016-04-14 11:54:50 -04:00
Rob Rix
282a993651 Add a mergeThese function to concatenate [Join These a] into Join These [a]. 2016-04-14 09:59:46 -04:00
Rob Rix
fcaa498033 Use sequenceL to invert the embedding of Join These (Maybe a) to Maybe (Join These a) 2016-04-14 09:50:44 -04:00
Rob Rix
345ac1b38a Use maybeThese to avoid the need for unconsThese. 2016-04-14 09:40:49 -04:00
Rob Rix
0867ae807f Implement group2 in terms of spanAndSplitLines. 2016-04-13 16:06:11 -04:00
Rob Rix
2ac2f6e5c9 Handle the empty case. 2016-04-13 16:05:56 -04:00
Rob Rix
0ea6286197 Split the body of spanAndSplitFirstLines onto a newline and dedent. 2016-04-13 16:05:48 -04:00
Rob Rix
b8bc77bb7f Return the heads/tails of children paired. 2016-04-13 11:47:35 -04:00
Rob Rix
747bfbf454 Return a list of nonintersecting children too. 2016-04-13 11:41:49 -04:00
Rob Rix
de05043c67 Span and split the intersecting first lines. 2016-04-13 11:08:01 -04:00
Rob Rix
7d11abd92a Split things up over several lines. 2016-04-12 17:58:54 -04:00
Rob Rix
dbe65d6831 Update the info with record syntax. 2016-04-12 17:56:52 -04:00
Rob Rix
0f8b6cea8d Preserve branch term sizes through splitting. 2016-04-12 10:48:30 -04:00
Rob Rix
852fa1f207 Preserve term sizes through splitting. 2016-04-12 10:42:44 -04:00
Rob Rix
71e8454fb4 Add a size field to Info. 2016-04-11 15:02:58 -04:00
Rob Rix
2f241803af Revert "Rewrite group2 in terms of spanIntersecting."
This reverts commit 3f808c548a6980b2ae35ec2fb7ea1dd249707668.
2016-04-11 12:06:02 -04:00
Rob Rix
48264b1cb3 Revert "Don’t bind tailRanges."
This reverts commit dcacd86ccb12fa11b603e0e7468614551104742e.
2016-04-11 12:04:34 -04:00
Rob Rix
fe7301ba3a Revert "Bind lists of intersecting & nonintersecting children."
This reverts commit 2453b500adc0774ab5311ca1eca946806b2bb9c9.
2016-04-11 12:04:19 -04:00
Rob Rix
87b699c09a Bind lists of intersecting & nonintersecting children. 2016-04-08 16:44:09 -04:00
Rob Rix
ec8fc5e7e7 Advance both sides if there are no unfinished children. 2016-04-08 15:22:09 -04:00
Rob Rix
efe7d43a59 Don’t bind tailRanges. 2016-04-08 15:06:00 -04:00
Rob Rix
20797a35c8 Use pairRangesWithLine to avoid unpacking Maybe. 2016-04-08 15:04:26 -04:00
Rob Rix
8c9a8906da Rewrite group2 in terms of spanIntersecting. 2016-04-08 15:00:17 -04:00
Rob Rix
338bfff7c3 spanMergeable returns left/right separately. 2016-04-08 14:53:52 -04:00
Rob Rix
65157c54f2 Document spanThese. 2016-04-08 12:06:19 -04:00
Rob Rix
dcd9431987 Add a spanThese function. 2016-04-08 12:04:01 -04:00
Rob Rix
eae8cf480b Coalesce the patterns. 2016-04-04 18:06:54 -04:00
Rob Rix
23a2e300ae intersects takes a single line. 2016-04-04 18:05:46 -04:00
Rob Rix
20c7578807 Consume all of the lines in group2. 2016-04-04 17:56:53 -04:00
Rob Rix
06dd79dc76 Align patches. 2016-04-04 17:26:40 -04:00
Rob Rix
0132f180ed 🔥 an extra commented-out line. 2016-04-04 17:20:54 -04:00
Rob Rix
84fc0a54a9 Implement alignPatch over Delete/Insert. 2016-04-04 17:20:21 -04:00
Rob Rix
881d902d3c Abstract alignSyntax over an Applicative instance.
This involves the use of a function which maps that functor into `Join
These`.
2016-04-04 17:18:29 -04:00
Rob Rix
c9fb18f128 🔥 the commented-out alignTerm. 2016-04-04 16:43:57 -04:00
Rob Rix
d2beafdc84 🔥 Both.unzip. 2016-04-04 16:25:16 -04:00
Rob Rix
df4247d0c9 alignSyntax takes the infos and syntax unpacked. 2016-04-04 15:54:38 -04:00
Rob Rix
013bf6e1c0 Extract alignSyntax to the top level. 2016-04-04 15:49:22 -04:00
Rob Rix
5ffd45ebe5 🔥 the old commented-out alignSyntax. 2016-04-04 15:47:43 -04:00
Rob Rix
f7c4c91cfe Align Fixed nodes. 2016-04-04 15:22:14 -04:00
Rob Rix
6856151fe5 Extract a wrapInBranch function to construct branches. 2016-04-04 15:21:57 -04:00
Rob Rix
9476b1226d 🔥 the huge comment block. 2016-04-04 13:35:04 -04:00
Rob Rix
261cb17a9a 🔥 advanceLeft/advanceRight. 2016-04-04 13:34:43 -04:00
Rob Rix
cd1601efbe Always advance on the intersecting side. 2016-04-04 13:34:21 -04:00
Rob Rix
16b08e3327 Advance along the sides that the child actually occupied. 2016-04-04 13:27:38 -04:00
Rob Rix
1f367274e7 advanceLeft/advanceRight are simple bifunctorial functions. 2016-04-04 13:21:05 -04:00
Rob Rix
522fd02b59 Rename first to firstLine. 2016-04-04 13:19:58 -04:00
Rob Rix
3d4f9a83f0 Use mask to select only the sides that the original child had. 2016-04-04 12:44:05 -04:00
Rob Rix
bb38e3dfa6 Add yet another gross function, this time to mask These with another These.
This is a bit like some bimap version of <$.
2016-04-04 12:43:32 -04:00
Rob Rix
8971b40e77 Take both sides when merging. 2016-04-04 12:43:11 -04:00
Rob Rix
7e23ffd86f Concatenate the unused side after splitting.
I suspect this will behave identically, but it is slightly more
accurate to our intention.
2016-04-01 16:04:55 -04:00
Rob Rix
1b1e88b4fd Define pairRangesWithLine over a Monoid instance to be total. 2016-04-01 10:56:44 -04:00
Rob Rix
8104f174ab Extract pairRangesWithLine to the top level. 2016-04-01 10:55:25 -04:00
Rob Rix
410a3044f9 Extract advanceLeft/advanceRight to top level. 2016-04-01 10:40:39 -04:00
Rob Rix
a582931a52 fmap outside of pairRangesWithLine. 2016-03-31 18:15:04 -04:00
Rob Rix
24ad721189 Rename atLeft/Right to advanceLeft/Right. 2016-03-31 18:08:02 -04:00
Rob Rix
3c11287729 🔥 maybeThese. 2016-03-31 18:00:03 -04:00
Rob Rix
6b00768ddf 🔥 spanMergeable. 2016-03-31 17:59:50 -04:00
Rob Rix
20ba0e37fd Rename pairRangeWithLine to pairRangesWithLine. 2016-03-31 17:44:10 -04:00
Rob Rix
2bc86aec0b Fix some misindentation. 2016-03-31 17:43:06 -04:00
Rob Rix
4878ed27df Split up children when merging asymmetrically. 2016-03-31 17:15:34 -04:00
Rob Rix
a56219d4d8 Lazily bind the splitting of the first line of the child. 2016-03-31 17:13:22 -04:00
Rob Rix
507595eed5 Only recur via the separate pattern. 2016-03-31 17:11:01 -04:00
Rob Rix
daca37bc24 Recur via a separate pattern.
This reverts commit 985ad3d43055c0773e85623db4a29fda8656ddbb.
2016-03-31 17:10:25 -04:00
Rob Rix
7442a180d6 group2 advances through the list of children. 2016-03-31 16:07:11 -04:00
Rob Rix
f1dea045e0 Rename the restOfChild binding to remainingLines. 2016-03-31 15:58:17 -04:00
Rob Rix
293d27d123 🔥 redundant parens. 2016-03-31 15:38:38 -04:00
Rob Rix
dea54b6790 Rename x to pairRangeWithLine. 2016-03-31 15:38:27 -04:00
Rob Rix
86cd2742c4 🔥 the annotation for x because it is chaff. 2016-03-31 15:38:21 -04:00
Rob Rix
669f6bef32 Output lines when no child intersects them. 2016-03-31 15:34:14 -04:00
Rob Rix
5376256525 Don’t bind the heads when we only use the tails. 2016-03-31 15:18:48 -04:00
Rob Rix
efeba311c7 🔥 uncons. 2016-03-31 15:18:22 -04:00
Rob Rix
308a78b61f 🔥 the rrrraaaangggeessss binding. 2016-03-31 15:18:00 -04:00
Rob Rix
f96a592152 Output lines after we’ve exhausted the children. 2016-03-31 15:13:35 -04:00
Rob Rix
2fa67f48e4 groupChildrenByLine calls out to group2. 2016-03-31 15:06:01 -04:00
Rob Rix
b3d202accb group2 pairs children with ranges. 2016-03-31 15:02:47 -04:00
Rob Rix
030ea2d1f5 group2 returns lists of children per line. 2016-03-31 15:01:11 -04:00
Rob Rix
5732aa30c8 Add some context comments about the problem cases. 2016-03-31 14:45:19 -04:00
Rob Rix
2da930ae53 Add a function to construct Maybe These from two Maybes. 2016-03-31 14:45:04 -04:00
Rob Rix
84d49ed4e2 Add a group2 function which advances through ranges for a given child. 2016-03-31 14:44:44 -04:00
Rob Rix
e5192708e0 Revert "Only take the first line from each child."
This reverts commit 439e9358ee46be695cf651ed35dc9f988e757b9d.
2016-03-31 10:01:45 -04:00
Rob Rix
8d808e32ca Revert "Skip a recursive call when we haven’t yet exhausted the lines in a child."
This reverts commit 6da256ef89752bf312a0ba40cf571ff8f410c436.
2016-03-31 10:01:42 -04:00
Rob Rix
19cc23b51a Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
# Conflicts:
#	src/Diff.hs
2016-03-30 20:20:50 -04:00
Rob Rix
e8fbe8c789 Move Info into its own module. 2016-03-30 17:26:52 -04:00
Rob Rix
5bc8e9b582 Skip a recursive call when we haven’t yet exhausted the lines in a child. 2016-03-29 16:07:53 -04:00
Rob Rix
fe3c43d3d9 Only take the first line from each child. 2016-03-29 15:36:49 -04:00
Rob Rix
73a2eac0bb intersects returns something in the shape of the ranges. 2016-03-29 15:30:53 -04:00
Rob Rix
35d60f8517 Rename heads/tails to headRanges/tailRanges. 2016-03-29 13:53:46 -04:00
Rob Rix
55742ac947 🔥 the inner go function. 2016-03-29 10:02:06 -04:00
Rob Rix
9417f9a5cf Spacing. 2016-03-29 09:58:31 -04:00
Rob Rix
6f4f9391de 🔥 bimapJoin. 2016-03-29 09:57:41 -04:00
Rob Rix
e356b1f29b groupChildrenByLine’s go function takes its ranges in Join These Range. 2016-03-29 09:42:19 -04:00
Rob Rix
48be9e9d81 There is only one cata. 2016-03-29 09:22:54 -04:00
Rob Rix
8db6772d07 Destructure lists embedded in Join These. 2016-03-28 19:17:38 -04:00
Rob Rix
d33a779768 spanMergeable takes its ranges in Join These. 2016-03-28 18:48:55 -04:00
Rob Rix
b5d1658e60 intersects takes its ranges in Join These. 2016-03-28 18:46:34 -04:00
Rob Rix
c5257ab009 Add a partial Applicative function for Join These. 2016-03-28 18:46:22 -04:00
Rob Rix
ffca96416f Extract and annotate the inner functions. 2016-03-28 18:27:01 -04:00
Rob Rix
e334308205 Eliminate repetition when binding this/that. 2016-03-28 18:09:59 -04:00
Rob Rix
178dc833b2 Rename left/right to this/that for clarity. 2016-03-28 18:08:54 -04:00
Rob Rix
17abfbb813 Generalize split for clarity that it cannot depend on diff details. 2016-03-28 18:08:46 -04:00
Rob Rix
133c69ec92 Span over the mergeable children. 2016-03-28 17:57:38 -04:00
Rob Rix
b4c75c7f55 Add a function to partition & divide children intersecting with a pair of lines. 2016-03-28 17:55:01 -04:00
Rob Rix
6f170a134d Add a function to split These into This and That. 2016-03-28 17:54:44 -04:00
Rob Rix
4fa1e1c2d3 Pull the or test out of intersects. 2016-03-28 17:53:39 -04:00
Rob Rix
82c2d29d5e Don’t join the child lines. 2016-03-28 16:40:21 -04:00
Rob Rix
71fd74527d Write intersects in non-tacit style. 2016-03-28 16:19:08 -04:00
Rob Rix
ed97e2fa36 Extract the intersection predicate into the where clause. 2016-03-28 16:10:38 -04:00
Rob Rix
07e3d89e2f Match if there are no intersecting lines. 2016-03-28 16:08:33 -04:00
Rob Rix
665afe2a29 Find intersecting child lines on either side. 2016-03-28 16:03:56 -04:00
Rob Rix
3c27e69000 🔥 the bogus context gathering guards. 2016-03-28 16:03:43 -04:00
Rob Rix
deff4e0c28 🔥 the asymmetric children-gathering. 2016-03-28 16:03:29 -04:00
Rob Rix
e81be3d4ba We meant to test whether these were _not_ empty. 2016-03-28 12:50:38 -04:00
Rob Rix
56c002fdf4 Inline the definition of intersecting. 2016-03-28 12:48:25 -04:00
Rob Rix
aa69c00245 concatMap. 2016-03-28 04:39:32 -04:00
Rob Rix
36ea4abdc8 🔥 some $s. 2016-03-28 04:39:26 -04:00
Rob Rix
f949aae3df Avoid some $s. 2016-03-28 04:39:15 -04:00
Rob Rix
4649aa290a Use null to test for emptiness. 2016-03-28 04:39:08 -04:00
Rob Rix
26199e2b22 Allow coincident endings in asymmetric alignments too. 2016-03-25 12:07:06 -04:00
Rob Rix
122ff8c182 Child ranges can end coincident with the line ranges and still intersect. 2016-03-25 11:52:30 -04:00
Rob Rix
acc7cd3ce8 Align trailing context asymmetrically. 2016-03-25 00:26:33 -04:00
Rob Rix
b04c844d17 Don’t short-circuit when there are still children to align. 2016-03-25 00:22:43 -04:00
Rob Rix
fd61294642 Advance asymmetrically. 2016-03-25 00:19:41 -04:00
Rob Rix
14a109b02e Require child lines to be matched. 2016-03-25 00:19:31 -04:00
Rob Rix
c5cb7da9b0 🔥 the intersects function. 2016-03-24 20:24:15 -04:00
Rob Rix
6e2de43c20 Bind lines/rest with pattern guards. 2016-03-24 15:30:04 -04:00
Rob Rix
5d34fb495d Take all intersecting child lines in a single pass. 2016-03-24 15:28:13 -04:00
Rob Rix
a03c9a90e8 Compute the child lines intersecting with the current lines. 2016-03-24 14:46:22 -04:00
Rob Rix
9e3db2853c Join the child lines. 2016-03-24 14:39:23 -04:00
Rob Rix
da3e338d84 Revert "Add runJoinWith to extract-and-apply Join."
This reverts commit c4027f8162ae6df17c2c91836dd518c6ab229e30.
2016-03-24 14:26:28 -04:00
Rob Rix
05bdd19053 Revert "Define modifyJoin in terms of runJoinWith."
This reverts commit 17fadce8973b46f1bf66d85c2acb8c0eecf5a334.
2016-03-24 14:26:25 -04:00
Rob Rix
3057ce5190 Just use runJoin when computing intersections. 2016-03-24 14:26:15 -04:00
Rob Rix
9047282ff8 Define modifyJoin in terms of runJoinWith. 2016-03-24 14:24:11 -04:00
Rob Rix
606b5b48c8 Add runJoinWith to extract-and-apply Join. 2016-03-24 14:24:02 -04:00
Rob Rix
f2bd582dfb Use bimap to simplify the intersection test. 2016-03-24 14:22:21 -04:00
Rob Rix
cdaae6866f Use bimapJoin to simplify the both-intersecting case. 2016-03-24 14:22:13 -04:00
Rob Rix
0429e14f36 Add bimapJoin to simplify modifying Join by a bimap. 2016-03-24 14:20:28 -04:00
Rob Rix
b2fce1abbd Express the if statement as a case expression. 2016-03-24 14:19:43 -04:00
Rob Rix
b7b823eb0c modifyJoin is parametric in the type of the bifunctor. 2016-03-24 14:18:53 -04:00
Rob Rix
cde7753e5b Less duplicative Indexed mapping. 2016-03-24 14:09:44 -04:00
Rob Rix
2f5127b6ca Less duplicative Leaf mapping. 2016-03-24 14:08:28 -04:00
Rob Rix
0ee12a96b4 Use modifyJoin to map Indexed lines. 2016-03-24 14:05:05 -04:00
Rob Rix
6d4e3761c6 Use modifyJoin to map leaf lines. 2016-03-24 14:04:43 -04:00
Rob Rix
4c132d0c2d Use modifyJoin to compute range/child intersections. 2016-03-24 14:02:40 -04:00
Rob Rix
71e53fd4ff Use modifyJoin to bimap inside a Join. 2016-03-24 14:01:30 -04:00
Rob Rix
d118070186 Add a convenience to modify the contents of a Join. 2016-03-24 13:59:49 -04:00
Rob Rix
6b18548eb0 Export groupChildrenByLine for the tests. 2016-03-24 13:53:49 -04:00
Rob Rix
36f32e0b75 Revert "Get the first ranges for a child."
This reverts commit 24c88022fbc6ad04912006fa9f8245bed742a342.
2016-03-24 12:52:47 -04:00
Rob Rix
1e09119163 Include child lines that exist on both sides. 2016-03-24 12:52:17 -04:00
Rob Rix
385d7570c8 Revert "Don’t iterate each line of each child."
This reverts commit 7149f1a4187ee0e855ed3538ec7fe26a0bac2eb5.
2016-03-24 11:52:14 -04:00
Rob Rix
b05b1694a7 Get the first ranges for a child. 2016-03-24 11:45:52 -04:00
Rob Rix
ccceb8d771 Re-add getRange. 2016-03-24 11:45:45 -04:00
Rob Rix
6a0302acbf Replace rangeLists with a use of fromThese. 2016-03-24 11:34:11 -04:00
Rob Rix
4d99c94bc2 Move the definition onto a new line. 2016-03-24 11:33:11 -04:00
Rob Rix
0a1b3508ee Don’t iterate each line of each child. 2016-03-24 11:32:41 -04:00
Rob Rix
6087ce0560 Place the comma at the start. 2016-03-24 11:32:20 -04:00
Rob Rix
eaff627676 Move rangeLists up. 2016-03-24 11:32:09 -04:00
Rob Rix
99d73906bc Stub in grouping children by line with a recursive function. 2016-03-24 11:05:57 -04:00
Rob Rix
aabb2bbbd1 Dedupe groupChildrenByLine. 2016-03-22 09:27:45 -04:00
Rob Rix
ca10210caa 🔥 the groupChildren binding. 2016-03-22 09:25:52 -04:00
Rob Rix
cff9130426 bimap so we get the correct categories. 2016-03-22 09:17:59 -04:00
Rob Rix
8b00b66b3f Align leaves. 2016-03-22 08:35:38 -04:00
Rob Rix
25e3a13309 Align diffs into lists of Join These. 2016-03-22 08:20:56 -04:00
Rob Rix
f03cdea1f7 Align Indexed branch nodes. 2016-03-21 18:27:46 -04:00
Rob Rix
0e83f33c6b Pair ranges and children. 2016-03-21 16:08:56 -04:00
Rob Rix
3e73aefb01 Don’t bother wrapping in Join.
We need a bifunctor here.
2016-03-21 16:04:21 -04:00
Rob Rix
d1d9fa6970 Add a function to group children by line. 2016-03-21 16:03:10 -04:00
Rob Rix
8a019572dc Embed in Join These outside of the alignSyntax call. 2016-03-21 14:47:26 -04:00
Rob Rix
2f37ba14bc Aligned leaf diffs have per-line ranges. 2016-03-21 13:38:36 -04:00
Rob Rix
d3e8b2ba80 Stub in a function to align diffs. 2016-03-21 13:26:38 -04:00
Rob Rix
89537b4f81 Aligned diffs are split diffs. 2016-03-21 13:10:28 -04:00
Rob Rix
a3e253804d 🔥 theseBoth. 2016-03-21 13:06:00 -04:00
Rob Rix
6422cb38a4 Define AlignedDiff as Joining These two terms. 2016-03-21 12:53:41 -04:00
Rob Rix
c16d725773 Remove a redundant import. 2016-03-21 09:30:54 -04:00
Rob Rix
dc0b5f0355 Revert "Stub in a Fix type for the sake of experimentation."
This reverts commit 91e8730e7e331abf10406c3d866796bb7f8b6d4f.
2016-03-18 15:16:22 -04:00
Rob Rix
9f1b7fc80f Truncate branches for the moment. 2016-03-18 15:15:05 -04:00
Rob Rix
ee81295592 Don’t bind leaf values. 2016-03-18 15:01:11 -04:00
Rob Rix
35215da076 Construct Aligned in alignSyntax. 2016-03-18 15:00:28 -04:00
Rob Rix
63f6389950 Define alignSyntax by case analysis. 2016-03-18 14:58:49 -04:00
Rob Rix
a11bc809df Remove the constructor parameter from alignTermBy and rename it. 2016-03-18 14:58:01 -04:00
Rob Rix
30e1da5a12 Use alignSyntax to construct Aligned functors. 2016-03-18 14:56:48 -04:00
Rob Rix
21356e0144 Add alignSyntax to split a leaf by its lines.
Doesn’t yet operate on branches. Invalidates some other assumptions.
2016-03-18 14:56:32 -04:00
Rob Rix
d318b6565c Get first and second from Data.Bifunctor instead of Control.Arrow. 2016-03-18 14:53:52 -04:00
Rob Rix
cceeffe360 The annotations are in Join. 2016-03-18 14:30:22 -04:00
Rob Rix
bad7878953 Pass the sources to alignTermBy. 2016-03-18 14:18:19 -04:00
Rob Rix
2900eb1f71 alignPatch takes the sources. 2016-03-18 14:15:49 -04:00
Rob Rix
8c791fb638 Annotate aligned diffs with These Info Info for marginal reductions in dubiousness. 2016-03-18 14:03:13 -04:00
Rob Rix
0e36a8af38 Rename the parameter to note its plurality. 2016-03-18 14:00:19 -04:00
Rob Rix
2a5f465a66 Slightly less dubiously, Aligned diffs carry Both Info. 2016-03-18 13:58:04 -04:00
Rob Rix
b9fc6d86e2 Aligned diffs carry Info.
This is extremely dubious, but it’s a start.
2016-03-18 13:55:41 -04:00
Rob Rix
77fd84f831 Run alignPatch in Cofree instead of Fix. 2016-03-18 13:46:56 -04:00
Rob Rix
82e29e2df7 Define anamorphisms over Cofree. 2016-03-18 12:50:16 -04:00
Rob Rix
bf87e931b7 Move the annotated hylo from Interpreter into Term. 2016-03-18 12:43:29 -04:00
Rob Rix
495204ce90 Extract a function to align terms. 2016-03-18 12:08:26 -04:00
Rob Rix
e61d8a27ff Stub in a type synonym for aligned diffs. 2016-03-18 12:02:07 -04:00
Rob Rix
00c3a2ef9f Spike out a function aligning Terms in Patches. 2016-03-18 12:01:59 -04:00
Rob Rix
23ba7c0ae6 hylo over Fix. 2016-03-18 12:00:00 -04:00
Rob Rix
ea6fd75131 cata over Fix. 2016-03-18 11:59:54 -04:00
Rob Rix
793025e65f ana over Fix. 2016-03-18 11:59:48 -04:00
Rob Rix
235e2207e8 Stub in a Fix type for the sake of experimentation. 2016-03-18 11:59:37 -04:00
Rob Rix
daba89d6b0 Be precise as to which cata we mean. 2016-03-18 11:59:19 -04:00
Rob Rix
f3c6f8b3f6 Compute lines within Adjoined. 2016-03-15 10:58:54 -04:00
Rob Rix
a46915b58c Inline rangeUntilNext. 2016-03-15 10:36:18 -04:00
Rob Rix
86b3d700a4 Rename placeChildAndRangeInContainer to match makeContextLines. 2016-03-15 09:23:14 -04:00
Rob Rix
9c69c1b6a6 🔥 unionLineRangesFrom. 2016-03-15 09:22:39 -04:00