joshvera
8be702f5e6
stub futu
2016-05-13 11:44:03 -04:00
joshvera
a5b838d458
Remove CofreeExtras
2016-05-10 17:50:37 -04:00
joshvera
9d67019376
Explicit type to maybeFirstCategory
2016-05-10 17:48:55 -04:00
joshvera
1503381bed
concat indexed and fixed diff summaries
2016-05-10 17:47:03 -04:00
joshvera
3160c8c464
s/patchSummary/patchToSummary
2016-05-09 15:00:15 -04:00
joshvera
14a405d8c8
Return a diff summary from termToSummary and make DiffSummary either be a DiffSummary of before and after summaries, a TermSummary, or an EmptySummary
2016-05-05 20:09:50 -04:00
joshvera
170110ee8e
Fix up tests
2016-05-04 15:15:25 -04:00
joshvera
48c7498ce2
Define Term in terms of Cofree
2016-05-04 14:37:24 -04:00
joshvera
1914950bc1
Stub diffSummary'
2016-05-03 15:50:38 -04:00
joshvera
9f8fc439b3
typealias Annotated to CofreeF
2016-05-03 14:19:10 -04:00
joshvera
fc0e9236e9
Stub diffSummary'
2016-05-03 14:10:36 -04:00
joshvera
a789af8f31
Define Annotated in terms of CofreeF
2016-05-03 14:10:25 -04:00
joshvera
4eedcc4a70
Fix up other catas
2016-05-03 12:36:59 -04:00
joshvera
6c07d4dc55
WIP CofreeF
2016-05-03 12:17:38 -04:00
Rob Rix
e70a50720c
alignChildrenInRanges always exhausts its inputs, so call it instead.
2016-04-27 17:44:15 -04:00
Rob Rix
97e4229f1b
Use record syntax to update the info.
2016-04-27 13:55:02 -04:00
Rob Rix
9aa7ca9d04
Extract contentElements to the top level.
2016-04-27 13:20:01 -04:00
Rob Rix
7369b7905f
Extract markupForContextAndChild to the top level.
2016-04-27 13:19:11 -04:00
Rob Rix
a01be5a419
Annotate the type of contentElements.
2016-04-27 13:18:06 -04:00
Rob Rix
43f59f0390
Simplify wrapIn’s type annotation.
2016-04-27 13:17:21 -04:00
Rob Rix
0ebffeb26a
Extract wrapIn to the top level.
2016-04-27 13:16:16 -04:00
Rob Rix
7413c72876
Count up in Both.
...
This is clunkier, but as @rachelmyers pointed out, it avoids the need
to reason on `increment` case-by-case.
For the same reason, it avoids the possibility of maintenance changing
`increment` in such a way that the selection of `first`/`second` falls
out of sync with the pattern being matched on; thus, it’s more
resilient to change.
2016-04-26 17:36:00 -04:00
Rob Rix
13d23e8d2d
Parens, not $.
2016-04-26 16:31:39 -04:00
Rob Rix
25f25c3fcb
Apply the increment function.
2016-04-26 16:31:33 -04:00
Rob Rix
808cf59fe5
Add a function to increment only the side we have a line on.
2016-04-26 16:30:57 -04:00
joshvera
a03be353d6
Expose Patch constructor and add summary
2016-04-25 22:14:53 -04:00
Rob Rix
64026caa06
🔥 runBoth.
2016-04-25 16:07:52 -04:00
Rob Rix
d5575fb999
🔥 pairWithThese.
2016-04-25 15:27:50 -04:00
Rob Rix
b0ed956779
🔥 maybeBothOfThese.
2016-04-25 15:24:46 -04:00
Rob Rix
85b1918224
Export applyThese/modifyJoin 😞
2016-04-25 14:42:38 -04:00
Rob Rix
8fee49b2e3
Maintain the fiction of multiple terms.
2016-04-25 12:29:50 -04:00
Rob Rix
97bebfbc30
uncurry lineFields.
2016-04-25 12:24:48 -04:00
Rob Rix
1e94f493c9
Reincorporate nextLines into the computation of thisRanges.
2016-04-25 12:06:30 -04:00
Rob Rix
c8903aefe7
Inline the definition of put
.
2016-04-25 12:00:33 -04:00
joshvera
305371e6c8
no comment
2016-04-25 11:50:56 -04:00
joshvera
33270bd65a
stub diffSummary
2016-04-25 11:46:10 -04:00
Rob Rix
df011fef9e
Generalize distribute
to arbitrary functors.
2016-04-25 11:38:35 -04:00
Rob Rix
36381cb432
Simplify the implementation of distribute.
2016-04-25 11:38:10 -04:00
Rob Rix
390302ae9d
Document distribute
.
2016-04-25 11:33:13 -04:00
Rob Rix
76f0b6fb0c
Rename invertEmbedding to distribute.
2016-04-25 11:26:20 -04:00
Rob Rix
ccb7568d3e
Align within a copointed functor to handle Keyed nodes.
2016-04-25 11:25:32 -04:00
Rob Rix
6b07bdf795
Add a function to invert the embedding of a copointed functor around Join These.
2016-04-25 11:19:51 -04:00
Rob Rix
d2dae5824d
Expect children to be in a copointed context.
2016-04-22 12:18:40 -04:00
Rob Rix
f48a47ce8f
Simplify prepending the tail.
2016-04-22 11:59:00 -04:00
Rob Rix
3fb4ad04fc
uncons the first/next lines in the spanning pass.
2016-04-22 11:57:38 -04:00
Rob Rix
76f46ebb02
No need to re-cons the lines of nonintersecting children.
2016-04-22 11:48:08 -04:00
Rob Rix
43fb9d2318
Revert "Add an Alt instance for OrderedMap."
...
This reverts commit 5471436d697c52613b6ebb05da3fdcf1959e3fa0.
2016-04-22 11:39:17 -04:00
Rob Rix
5fa6cb280c
Revert "Add a Plus instance for OrderedMap."
...
This reverts commit 031af68c173dc8f2c4ac556d2fa01fe15bf3cc6a.
2016-04-22 11:39:14 -04:00
Rob Rix
20f035316e
Add a Plus instance for OrderedMap.
2016-04-22 11:05:13 -04:00
Rob Rix
4a4f5a0f14
Add an Alt instance for OrderedMap.
2016-04-22 11:05:08 -04:00
Rob Rix
4a818d4d11
Move the Monoid instance over OrderedMap to the bottom.
2016-04-22 11:04:53 -04:00
Rob Rix
3a130c9a66
Derive a Functor instance for Union.
2016-04-22 10:39:15 -04:00
Rob Rix
87f99998c9
split via a pattern guard.
2016-04-22 10:39:03 -04:00
Rob Rix
ab023c3dcb
Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
2016-04-22 09:33:51 -04:00
joshvera
b16484ce44
Move idOrEmptySourceBlob and nullOid to Source
2016-04-20 16:01:24 -04:00
Rob Rix
1a9bc1326e
Fold right and be more careful about context.
2016-04-15 14:36:05 -04:00
Rob Rix
488a05bc28
Don’t compute term sizes, use the cached ones.
2016-04-15 14:32:24 -04:00
Rob Rix
2fe1903c92
Use GeneralizedNewtypeDeriving in Data.OrderedMap.
2016-04-15 13:47:43 -04:00
Rob Rix
c4b63bdc42
OrderedMap is a newtype.
2016-04-15 13:47:21 -04:00
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
2ca1caaa98
Replace Data.Option with a dependency on semigroups.
2016-04-15 12:20:27 -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
2f5f0ad55b
Revert "Add Alt and Plus instances over OrderedMap."
...
This reverts commit ac24ca8debc3674940532944d59ee4b390489cca.
2016-04-15 11:57:23 -04:00
Rob Rix
7fa9fa1238
Hide Alt.
2016-04-15 11:28:43 -04:00
Rob Rix
4515b03fc7
Add Alt and Plus instances over OrderedMap.
2016-04-15 11:26:51 -04:00
Rob Rix
025d91f6ad
🔥 Data.Copointed; use pointed
instead.
2016-04-15 11:19:50 -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
d623699573
Fold right through separators & children when rendering split diffs.
2016-04-15 09:54:12 -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
92b4fcba1b
📝 intersectsRange.
2016-04-15 09:34:58 -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
1e4e6af073
Replace uses of Row with Join These.
2016-04-15 09:23:35 -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
4845ee1245
🔥 the TotalCrosswalk instance over Both.
2016-04-14 21:59:44 -04:00
Rob Rix
b036fa27a3
🔥 Data.Coalescent.
2016-04-14 21:59:25 -04:00
Rob Rix
e4e3418a7a
🔥 Data.Adjoined.
2016-04-14 21:59:11 -04:00
Rob Rix
8fc7a094a5
🔥 Line.
2016-04-14 21:58:37 -04:00
Rob Rix
b934fc53a0
import Patch for maybeSnd.
2016-04-14 21:57:21 -04:00
Rob Rix
84abff8773
Move the extras atop These into Alignment.
2016-04-14 21:47:18 -04:00
Rob Rix
ee91e6daef
🔥 the Coalescent instance over Both (Line a).
2016-04-14 21:23:21 -04:00
Rob Rix
a93a99caa2
Move maybeFst/maybeSnd into Patch.
2016-04-14 21:19:21 -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
593ea842e0
Move maybeFirst into Renderer.Split.
2016-04-14 20:31:59 -04:00
Rob Rix
7c63e92ea7
Construct SplitPatches.
2016-04-14 20:27:24 -04:00
Rob Rix
631496062f
🔥 setCharacterRange.
2016-04-14 19:42:14 -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
97da08d935
Add a mergeThese function.
2016-04-14 18:25:54 -04:00
Rob Rix
c955c94729
Move alignDiff up.
2016-04-14 17:03:53 -04:00
Rob Rix
b7627ca4cc
Revert "Add an Intersection newtype wrapping These."
...
This reverts commit 4de08172ae4172f865db558fae28dc5753cdd1a4.
2016-04-14 16:38:47 -04:00
Rob Rix
fd4d1a66ac
Revert "Add a Monoid instance over Intersection."
...
This reverts commit fee81dc54f0336f4c07267726d74543f01b50b9f.
2016-04-14 16:38:43 -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
c547f4e13d
Add a Monoid instance over Intersection.
2016-04-14 12:05:44 -04:00
Rob Rix
ddb1898b39
Add an Intersection newtype wrapping These.
2016-04-14 12:05:38 -04:00
Rob Rix
cde4b78196
Add a Monoid instance over Union.
2016-04-14 12:05:30 -04:00
Rob Rix
9f835dbd04
Add a Union type wrapping These.
2016-04-14 12:05:21 -04:00
Rob Rix
19b6b1fc1d
Document apThese.
2016-04-14 12:04:37 -04:00
Rob Rix
50beaefa99
Add an apThese function.
2016-04-14 12:04:33 -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
9a24a431da
Revert "Revert "Add a maybeThese function to simplify constructing These from Maybes.""
...
This reverts commit 5b69bfee53882ecb049831e1b04659766a234e27.
2016-04-14 10:53:43 -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
4fa1067611
Revert "Add a maybeThese function to simplify constructing These from Maybes."
...
This reverts commit 0893da5b7fb31bde527d3580e6daa04db5f7df3c.
2016-04-14 09:50:52 -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
02db765b49
Add a maybeThese function to simplify constructing These from Maybes.
2016-04-14 09:33:22 -04:00
Rob Rix
b8da3f06cf
Add a Crosswalk instance over [].
2016-04-13 16:24:03 -04:00
Rob Rix
ba9fd58724
Define the Crosswalk instance for Join These in terms of on
.
2016-04-13 16:21:29 -04:00
Rob Rix
156c8820e6
Add a Bitraversable instance over These.
2016-04-13 16:15:42 -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
a70981b2fb
📝 diffTerms’ cost parameter.
2016-04-12 18:00:50 -04:00
Rob Rix
63a3b69c24
Split replaceIn across several lines.
2016-04-12 18:00:09 -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
joshvera
37c7542d5a
Add Show instances for Arguments
2016-04-12 13:10:24 -04:00
Rob Rix
694567f8e3
Use the absolute difference cost.
2016-04-12 11:53:56 -04:00
Rob Rix
1d639ce8eb
Compute the absolute difference of a diff as its cost.
2016-04-12 11:53:51 -04:00
Rob Rix
d872b5ffff
Add a cost function which sums diff sizes, not just term sizes.
2016-04-12 11:46:37 -04:00
Rob Rix
851d53fa07
Recompute term sizes after replacing multi-word leaves.
2016-04-12 11:22:02 -04:00
Rob Rix
9a5dca4558
One plus the sum.
2016-04-12 11:21:16 -04:00
Rob Rix
da4fc09e82
Reformat across lines.
2016-04-12 11:13:29 -04:00
Rob Rix
6075a62626
Write term sizes out in split diffs.
2016-04-12 10:56:01 -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
e6c81e1c22
🔥 some redundant imports & bindings.
2016-04-12 04:44:12 -04:00
Rob Rix
3239eaf551
Compute diff costs via foldMap.
2016-04-11 16:51:10 -04:00
Rob Rix
ddeb3f9063
Derive a Foldable instance for Patch.
2016-04-11 16:50:48 -04:00
Rob Rix
465c1f9ab7
Use the cached term sizes to diff.
2016-04-11 15:09:45 -04:00
Rob Rix
2a08e059d2
Add a function to compute the cost from the cached term sizes.
2016-04-11 15:09:21 -04:00
Rob Rix
b3eb86a9e4
Correct the docs of diffCost.
2016-04-11 15:06:59 -04:00
Rob Rix
97b588d5e3
Correct the docs of termSize.
2016-04-11 15:06:53 -04:00
Rob Rix
c8c195daf8
Rename getSize to size.
2016-04-11 15:04:44 -04:00
Rob Rix
71e8454fb4
Add a size field to Info.
2016-04-11 15:02:58 -04:00
Rob Rix
4fb2c30892
Pass the cost function to interpret
.
2016-04-11 14:49:25 -04:00
Rob Rix
0b4696062d
Compute term sizes as node counts.
2016-04-11 13:54:46 -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
c79773ceea
🔥 an unused parameter.
2016-04-04 18:02:43 -04:00
Rob Rix
dd38cf4bd7
🔥 some redundant imports.
2016-04-04 18:02:32 -04:00
Rob Rix
8b2a9fb6d0
Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
...
# Conflicts:
# src/Renderer/JSON.hs
# src/Renderer/Patch.hs
# test/CorpusSpec.hs
2016-04-04 18:00:25 -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
joshvera
a553709112
Specialize Renderer to Text
2016-04-04 17:20:26 -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
joshvera
3b752b834c
docs
2016-04-04 17:12:55 -04:00
joshvera
90013b1235
Rename printDiff to textDiff and printDiff' to printDiff
2016-04-04 17:08:29 -04:00
joshvera
506abacbc6
Document use of strictness in diffFiles
2016-04-04 17:03:35 -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
de6696ce50
Simplify unzip
using the Applicative
instance.
2016-04-04 15:41:01 -04:00
Rob Rix
fd150be38e
🔥 bothOfThese
.
2016-04-04 15:39:07 -04:00
Rob Rix
a33acf8bdf
Simplify maybeBothOfThese
around fromThese
.
2016-04-04 15:38:56 -04:00
Rob Rix
25bae5d9e0
Simplify bothOfThese
around fromThese
.
2016-04-04 15:38:07 -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
06c4759aed
Represent Both
as Join (,)
.
2016-04-04 15:01:47 -04:00
Rob Rix
60d6cfeb90
Use the curried both
constructor.
2016-04-04 14:53:09 -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
joshvera
cf898c66c6
Strictly render in diffFiles
2016-04-01 15:35:38 -04:00
joshvera
842a0f30af
Move emptyHunk to a function
2016-04-01 15:35:21 -04:00
joshvera
a18c2649d3
Add a truncatePatch function
2016-04-01 15:35:09 -04:00
joshvera
7947bc1911
Move DiffArguments to Renderer.hs
2016-04-01 15:34:52 -04:00
joshvera
e44b24806f
Merge remote-tracking branch 'origin/master' into async
2016-04-01 12:52:17 -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
dd1355e978
Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly
2016-03-31 18:01:49 -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
da3f04100e
Merge branch 'master' into one-header-per-file
2016-03-31 17:00:37 -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