1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00
Commit Graph

4050 Commits

Author SHA1 Message Date
Rob Rix
8dda0cbd39 Show lines with prefixes. 2015-12-24 18:20:28 -05:00
Rob Rix
6c32921b99 Add a type annotation for showHunk. 2015-12-24 18:17:25 -05:00
Rob Rix
b138e2b5b8 Move {row,line,diff}HasChanges to the top level. 2015-12-24 18:14:19 -05:00
Rob Rix
30805882b5 Derive the Show instance for Hunk. 2015-12-24 18:11:38 -05:00
Rob Rix
3fd62682d8 Show hunks in their sources. 2015-12-24 18:11:32 -05:00
Rob Rix
dadae9497d Add a showHunk function to pretty-print a hunk within a pair of sources. 2015-12-24 18:11:19 -05:00
Rob Rix
bfb553b7f1 Add a Monoid instance for Range. 2015-12-24 18:10:29 -05:00
Rob Rix
7c95ee30e2 Find (part of) the next hunk in a list of rows. 2015-12-24 17:58:09 -05:00
Rob Rix
82b054c559 Add a function to take the last n elements of a list. 2015-12-24 17:54:26 -05:00
Rob Rix
33240ced54 Find the hunks in a diff & sources. 2015-12-24 17:42:38 -05:00
Rob Rix
052217ea3b Add a function to find the hunks in a list of rows, recursively. 2015-12-24 17:42:22 -05:00
Rob Rix
b535fac1ea Stub in a function to compute the next Hunk & remaining rows in a list of rows. 2015-12-24 17:42:08 -05:00
Rob Rix
a10cc9f13e Hunks are defined over Rows. 2015-12-24 17:41:45 -05:00
Rob Rix
25b9699981 Remove Line. 2015-12-24 17:15:13 -05:00
Rob Rix
1c1da259a7 Define Hunk using record syntax. 2015-12-24 17:14:47 -05:00
Rob Rix
77b92d98a6 Eta reduction. 2015-12-24 17:02:31 -05:00
Rob Rix
c9ab8a131d Correct the tests. 2015-12-24 16:38:50 -05:00
Rob Rix
5257089ad4 Patches are constructed over Source Chars. 2015-12-24 16:37:14 -05:00
Rob Rix
0866ef52bd Merge branch 'diff-performance' into patch 2015-12-24 16:33:24 -05:00
Rob Rix
63f08c406c Merge branch 'parse-performance' into diff-performance 2015-12-24 10:57:33 -05:00
Rob Rix
dfc5fbee04 Merge branch 'split-performance' into parse-performance
# Conflicts:
#	src/Range.hs
2015-12-24 10:56:51 -05:00
Rob Rix
9fdd72b8c6 Optimize maybeLast for vector access. 2015-12-24 10:48:58 -05:00
Rob Rix
7a49534034 Use makeLine as appropriate in the tests. 2015-12-24 10:44:40 -05:00
Rob Rix
c786d2d83d Lines are parameterized by Vectors. 2015-12-24 10:41:07 -05:00
Rob Rix
d6faa15321 Implement intercalate over Foldables. 2015-12-24 10:40:56 -05:00
Rob Rix
2644e8f602 Implement intersperse over Foldables. 2015-12-24 10:40:47 -05:00
Rob Rix
162f51016e Use makeLine to construct contextLines. 2015-12-24 10:38:46 -05:00
Rob Rix
d3e8dd867b Add a makeLine function constructing Lines from lists. 2015-12-24 09:53:05 -05:00
Rob Rix
e6e3d9d450 classifyMarkup takes the first category if any. 2015-12-24 09:51:56 -05:00
Rob Rix
e77b3a8bd4 Add maybeFirst over Foldables. 2015-12-24 09:51:47 -05:00
Rob Rix
e1f5986c21 Qualify the import of Source with less chaff. 2015-12-24 09:51:38 -05:00
Rob Rix
6be93fa749 Dollar sign spaceship operator to the rescue. 2015-12-24 01:10:17 -05:00
Rob Rix
671ecc2c11 Rejigger some parentheses to avoid a $. 2015-12-24 01:09:49 -05:00
Rob Rix
56aa250f96 Eta-reductions. 2015-12-24 01:09:40 -05:00
Rob Rix
d17a44221d Don’t re-sum the costs. 2015-12-24 01:08:53 -05:00
Rob Rix
dba213ebfc Remove an unnecessary $. 2015-12-24 01:08:23 -05:00
Rob Rix
093fc26d13 Use Source.null in the guard. 2015-12-24 00:23:36 -05:00
Rob Rix
9343e9d4ae Do all formatting within Sources. 2015-12-24 00:20:47 -05:00
Rob Rix
cfeb9e4ee8 Move actualLines/actualLineRanges into the Source module. 2015-12-24 00:08:17 -05:00
Rob Rix
d355f268e6 Hide ++ in the tests. 2015-12-23 23:44:02 -05:00
Rob Rix
eb461a3915 Concatenate Sources in actualLines. 2015-12-23 23:41:31 -05:00
Rob Rix
4395e49104 Define Source concatenation. 2015-12-23 23:41:08 -05:00
Rob Rix
69aadf4ec5 Rename makeSourcefromList. 2015-12-23 23:37:51 -05:00
Rob Rix
b138864068 Correct the tests. 2015-12-23 23:36:49 -05:00
Rob Rix
3ca9064869 O(1) indexing. 2015-12-23 23:29:27 -05:00
Rob Rix
8a2aca45e1 Tacit definition of null. 2015-12-23 23:28:13 -05:00
Rob Rix
ad6e7f2ae7 Tacit definition of slice. 2015-12-23 23:27:07 -05:00
Rob Rix
0bb6462fad Rename unSource to toList. 2015-12-23 23:26:37 -05:00
Rob Rix
e4225faa20 Rename subsourceslice. 2015-12-23 23:25:00 -05:00
Rob Rix
55d3ed38a4 A let expression makes more sense. 2015-12-23 23:23:16 -05:00