Rob Rix
02e8e7d5c7
Define contiguousChanges
in terms of changeIncludingContext
.
2015-12-30 17:52:18 -05:00
Rob Rix
ed9b57af4e
Define nextChange
in terms of changeIncludingContext
.
2015-12-30 17:43:46 -05:00
Rob Rix
4e10072341
Hide Source.break
.
2015-12-30 17:42:18 -05:00
Rob Rix
e65ea093d4
Add a function constructing a Change which includes all leading context.
2015-12-30 17:41:24 -05:00
joshvera
6790640915
Move pack into getSubstring
2015-12-30 17:36:41 -05:00
joshvera
943514f235
++text-icu
2015-12-30 17:35:47 -05:00
Rob Rix
159f39b1dc
Bind the last change in a let statement.
2015-12-30 17:35:04 -05:00
Rob Rix
d64cb6f757
Accumulate contiguous changes into a single hunk.
2015-12-30 17:32:07 -05:00
Rob Rix
c1722fec1a
Diff lines are evidently 1-indexed.
2015-12-30 16:39:23 -05:00
Rob Rix
06a9d6489b
Remove takeLast
.
2015-12-30 16:35:34 -05:00
Rob Rix
21eadcd28b
Take the size of the correct list.
2015-12-30 16:33:45 -05:00
Rob Rix
2c7302b770
Only count the skipped context.
2015-12-30 16:32:42 -05:00
Rob Rix
78bd3783d2
Split the leading context with splitAt
.
2015-12-30 16:32:29 -05:00
Rob Rix
0cf930efb4
Sum the lengths of the leading rows for the offset.
2015-12-30 16:30:52 -05:00
Rob Rix
61ddae853c
Compute (wrong) offsets to changes and hunks.
2015-12-30 16:26:02 -05:00
Rob Rix
8a22a8a0c8
Leave Hunk
lengths in Sum
.
2015-12-30 16:25:18 -05:00
Rob Rix
b20aca9459
Leave Hunk
offsets in Sum
.
2015-12-30 16:24:33 -05:00
Rob Rix
a842048ae1
Offsets are pairs.
2015-12-30 16:05:42 -05:00
Rob Rix
2b352e44d4
Render lines in Maybe.
2015-12-30 16:03:38 -05:00
Rob Rix
0fff708848
Render empty lines to empty strings.
2015-12-30 16:00:56 -05:00
Rob Rix
72f5e22fde
Hunk headers include the hunk lengths.
2015-12-30 15:59:00 -05:00
Rob Rix
2547306a56
Add a function to compute the lengths of hunks in Sum.
2015-12-30 15:57:36 -05:00
Rob Rix
f6fbefb36e
changeLength doesn’t unpack the Sums.
2015-12-30 15:56:52 -05:00
Rob Rix
bf2651da67
Sum the lengths of changes.
2015-12-30 15:56:12 -05:00
Rob Rix
e7dc4e89ae
Add a rowLength function in Sum.
2015-12-30 15:56:03 -05:00
Rob Rix
def3237ace
Add a lineLength function in Sum.
2015-12-30 15:55:55 -05:00
Rob Rix
c3b2459528
Merge branch 'master' into patch
2015-12-30 15:39:15 -05:00
Rob Rix
dc39aa4007
Remove the Eq constraints.
2015-12-30 15:38:53 -05:00
Rob Rix
ebaf291a33
Render context rows with showRow
.
2015-12-30 15:38:11 -05:00
Rob Rix
0010ec796a
Rename lineString to showLine.
2015-12-30 15:37:04 -05:00
Rob Rix
3c4cf3c514
Remove showLine.
2015-12-30 15:36:51 -05:00
Rob Rix
386ae52c77
Test string equality when rendering rows as changes.
2015-12-30 15:36:31 -05:00
Rob Rix
7763423e9d
Capture strings for row lines.
2015-12-30 15:36:11 -05:00
Rob Rix
4c31d94350
Use lineString to render leading context.
2015-12-30 15:35:21 -05:00
Rob Rix
2647390232
Use lineString to render trailing context.
2015-12-30 15:34:53 -05:00
Rob Rix
8d0df93193
Use lineString to show rows.
2015-12-30 15:34:05 -05:00
Rob Rix
4b222e6fbd
Add a lineString
function.
2015-12-30 15:32:51 -05:00
Rob Rix
8b4d158f4c
Pass sources as a pair.
2015-12-30 15:31:27 -05:00
Rob Rix
d2f63f77f1
Render hunks’ trailing context.
2015-12-30 15:29:17 -05:00
Rob Rix
2fc7d8f537
Move showRow to the top level.
2015-12-30 15:27:04 -05:00
Rob Rix
636e526311
Move showLine to the top level.
2015-12-30 15:27:00 -05:00
Rob Rix
be2476cfda
Move getRange to the top level.
2015-12-30 15:26:49 -05:00
Rob Rix
725ef9c1d0
Pass the sources around as a pair.
2015-12-30 15:23:52 -05:00
Rob Rix
ebafcab8df
Add trailing context to hunks.
2015-12-30 15:21:26 -05:00
Josh Vera
64167f320a
Merge pull request #365 from github/diff-performance
...
Diff performance tweaks
2015-12-30 14:32:46 -05:00
Rob Rix
27a877e861
Generalize unionRanges
to Foldable
Functor
s.
...
We use `Foldable` and `Functor`, and not `Traversable`, because the
latter is not automatically implied by the former. I.e. we use the
minimum necessary set of constraints.
2015-12-30 13:45:04 -05:00
Rob Rix
176d45b59d
Union the ranges rather than concatenating them.
2015-12-30 12:35:27 -05:00
Rob Rix
a225fb20fe
Workaround default Num constraint warnings.
2015-12-30 12:31:38 -05:00
Rob Rix
4e96478cbb
Merge branch 'diff-performance' into patch
...
# Conflicts:
# src/Split.hs
2015-12-30 12:17:33 -05:00
Rob Rix
e1fa8d089e
Merge branch 'master' into diff-performance
2015-12-30 12:14:44 -05:00