1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
Commit Graph

3448 Commits

Author SHA1 Message Date
Rob Rix
aa2b6a277c 🔥 unused inner functions. 2016-07-22 13:54:46 -04:00
Rob Rix
c92cc987ed Put some formatting back. 2016-07-22 13:52:48 -04:00
joshvera
819470afea use biseuqnceL for comments 2016-07-22 12:55:54 -04:00
joshvera
b27eac56d9 Merge remote-tracking branch 'origin/master' into syntax-redux 2016-07-22 12:38:34 -04:00
joshvera
70f9329f1a Merge remote-tracking branch 'origin/master' into syntax-redux 2016-07-22 12:36:03 -04:00
Rob Rix
093048b736 Stop hiding a symbol we don’t shadow. 2016-07-22 11:58:09 -04:00
Rob Rix
041aea8f4c 🔥 the orphan Crosswalk instance over Join of Bicrosswalkable bifunctors. 2016-07-22 11:42:00 -04:00
Rob Rix
d8f8b50cb9 Compute Leaf alignment using the Bicrosswalk instance. 2016-07-22 11:41:45 -04:00
Rob Rix
4f8ef622aa Use the Bicrosswalk instance directly. 2016-07-22 11:39:30 -04:00
Rob Rix
0016bb92ea Merge branch 'master' into generalize-rws-over-the-functor 2016-07-21 11:49:55 -04:00
joshvera
7cadd91ca3 Merge remote-tracking branch 'origin/master' into 🔥-diff-output-module 2016-07-21 11:46:06 -04:00
joshvera
bd985202ee Add an error case to Objects 2016-07-17 11:18:45 -04:00
joshvera
ad4d36f7fd Add a CoArbitrary instance to Category 2016-07-17 11:18:31 -04:00
joshvera
ac36cf5bcc Pretty print diff summaries as lists of LeafInfo Docs 2016-07-15 17:06:41 -04:00
Rob Rix
13205aa009 Pattern match inline. 2016-07-15 16:11:36 -04:00
Rob Rix
c92ce1b6fd printDiff calls into textDiff. 2016-07-15 16:05:17 -04:00
Rob Rix
3b61b5c5be Rearrange printDiff to apply the --output flag in all cases. 2016-07-15 16:03:51 -04:00
Rob Rix
631b557823 🔥 DiffOutput.hs. 2016-07-15 16:01:43 -04:00
Rob Rix
48edd67a65 Move textDiff, truncatedDiff, and printDiff into Diffing.hs. 2016-07-15 16:00:39 -04:00
Rob Rix
3794c7a437 Replace an obscure hylo with a clearer cata. 2016-07-15 15:18:51 -04:00
Rob Rix
ae8d744061 📝 rws in full. 2016-07-15 15:15:22 -04:00
Rob Rix
0337e18baf Correct the documentation of rws. 2016-07-15 15:13:14 -04:00
Rob Rix
145252c8ba Generalize UnmappedTerm, allowing a decidable Eq instance. 2016-07-15 15:12:27 -04:00
Rob Rix
882c4fe2ff Generalize rws over arbitrary functors. 2016-07-15 15:05:46 -04:00
Rob Rix
bdb93ef44b pqGrams doesn’t require Syntax. 2016-07-15 14:55:26 -04:00
Rob Rix
2d4778160f We no longer rely on Hashable leaves. 2016-07-15 14:54:34 -04:00
Rob Rix
190dcfe18c pqGrams doesn’t include leaf values in labels itself. 2016-07-15 14:49:39 -04:00
Rob Rix
d6bf0920bd Add leaf values to the labels computed in Interpreter. 2016-07-15 14:49:21 -04:00
Rob Rix
4b33b24a05 Labels are computed from the entire term. 2016-07-15 14:45:37 -04:00
Rob Rix
9ca138df07 Assign siblings and merge in a single step. 2016-07-15 14:35:14 -04:00
joshvera
ea814432a6 Add a property test to check number of LeafInfos in diff summaries match leaves in diff patches 2016-07-15 14:10:31 -04:00
joshvera
e57f30f20b DiffInfo are now either LeafInfos or BranchInfos 2016-07-15 13:18:45 -04:00
Rob Rix
b96f60be92 🔥 Size. 2016-07-15 11:18:26 -04:00
Rob Rix
8754120403 🔥 the size/setSize accessors. 2016-07-15 11:18:21 -04:00
Rob Rix
5bc2cd93f1 Only annotate terms & diffs with costs, not sizes. 2016-07-15 11:17:53 -04:00
Rob Rix
e08fbd141f 📝 Cell. 2016-07-15 11:16:30 -04:00
Rob Rix
9a75c03c1e 🔥 unused field accessors. 2016-07-15 11:15:42 -04:00
Rob Rix
aa5c870e52 🔥 maybeFirst. 2016-07-15 11:15:04 -04:00
Rob Rix
6f0a55a487 Only export split. 2016-07-15 11:14:43 -04:00
Rob Rix
6859cba690 Don’t annotate with term costs. 2016-07-15 11:13:59 -04:00
Rob Rix
274c831e72 Don’t annotate zero-cost nodes. 2016-07-15 11:11:04 -04:00
Rob Rix
81279c910e Split out the attributes into separate functions. 2016-07-15 11:05:39 -04:00
Rob Rix
1cb3656502 Uniform split rendering of branches. 2016-07-15 10:53:43 -04:00
Rob Rix
08246f3a4c Simplify the catamorphism over terms/split diffs. 2016-07-15 10:52:28 -04:00
Rob Rix
7e3b470631 Repackage Renderable up with source & other. 2016-07-15 10:51:18 -04:00
Rob Rix
29812c4095 Use a strict Line type in split rendering. 2016-07-15 10:46:51 -04:00
Rob Rix
e5ad1d1c42 Use a strict Cell type in split rendering. 2016-07-15 09:59:23 -04:00
Rob Rix
7e4c68d182 Group all the ToMarkup instances together. 2016-07-15 09:55:29 -04:00
Rob Rix
b2fdfdba66 Placate hlint. 2016-07-15 09:55:00 -04:00
Rob Rix
aad375951f Render the Cost instead of the Size in Split diffs. 2016-07-15 09:52:25 -04:00
Rob Rix
747ae7cbfb 🔥 the InfoFields and Info type synonyms. 2016-07-15 09:41:22 -04:00
joshvera
13671e5d14 Add patchAnnotations to DiffInfo to track discarded branch nodes 2016-07-14 19:35:23 -04:00
Rob Rix
0a4c91c784 Remove some redundant imports. 2016-07-14 16:38:44 -04:00
Rob Rix
300bd2b84c Renderer takes an annotation type parameter. 2016-07-14 16:36:47 -04:00
Rob Rix
1e88543504 Generalize breakDownLeavesByWord over extensible record annotations. 2016-07-14 16:35:49 -04:00
Rob Rix
d1ed015446 Parser takes a list of field types. 2016-07-14 16:35:20 -04:00
Rob Rix
c59bb6ebfe 🔥 the Constructor type synonym. 2016-07-14 16:34:02 -04:00
Rob Rix
7c2a0d5cbb Generalize termConstructor over extensible record annotations. 2016-07-14 16:33:53 -04:00
Rob Rix
74df628f17 Weaken Interpreter’s constraint on annotations to Eq. 2016-07-14 16:18:06 -04:00
Rob Rix
1a2004fc78 Generalize split rendering over extensible record annotations. 2016-07-14 16:11:06 -04:00
Rob Rix
548b7936a7 Generalize patch rendering over extensible record annotations. 2016-07-14 16:10:51 -04:00
Rob Rix
efe868b01a Generalize the ToJSON instances over extensible record annotations. 2016-07-14 16:10:29 -04:00
Rob Rix
cd19193471 Avoid requiring Show instances everywhere. 2016-07-14 15:59:23 -04:00
Rob Rix
4d6ab97691 Placate hlint. 2016-07-14 15:53:52 -04:00
Rob Rix
edaf78c7ce 🔥 the import of the Info symbol. 2016-07-14 15:51:30 -04:00
Rob Rix
3166b53f52 Generalize diffSummary to extensible record annotations. 2016-07-14 15:51:09 -04:00
Rob Rix
0bbe856d3d Generalize diffSummary' to extensible record annotations. 2016-07-14 15:50:38 -04:00
Rob Rix
ea6ff00a7a Generalize the HasCategory instance over terms to extensible record annotations. 2016-07-14 15:49:58 -04:00
Rob Rix
8828adf0bd Generalize maybeTermName over HasField. 2016-07-14 15:49:10 -04:00
joshvera
9a01466bfc Merge branch 'syntax-redux' into pretty-print-summaries 2016-07-14 15:30:15 -04:00
joshvera
27c338331f Merge remote-tracking branch 'origin/master' into syntax-redux 2016-07-14 15:22:46 -04:00
joshvera
453334d966 Use wl-pprint-text to pretty print diff summaries 2016-07-14 14:44:18 -04:00
joshvera
58ff433dd0 Merge remote-tracking branch 'origin/master' into pretty-print-summaries 2016-07-14 14:38:46 -04:00
Rob Rix
9e9622ef10 🔥 a redundant import. 2016-07-14 14:25:49 -04:00
Rob Rix
7304d79e53 Don’t import the Info type synonym. 2016-07-14 14:25:43 -04:00
Rob Rix
f51b1724fe Generalize diffSummary over records. 2016-07-14 14:25:37 -04:00
Rob Rix
13d2dfc24f Generalize termToDiffInfo over records. 2016-07-14 14:25:27 -04:00
Rob Rix
fa44ef74d8 🔥 the HasCategory instance over Info. 2016-07-14 14:23:51 -04:00
Rob Rix
577ca768bb Get the category name from the Term instance. 2016-07-14 14:23:44 -04:00
Rob Rix
63a37920ac Generalize HasCategory over categorizable terms. 2016-07-14 14:19:47 -04:00
Rob Rix
51b55cc1b4 Generalize toTermName over record annotations. 2016-07-14 14:19:15 -04:00
Rob Rix
323c426e24 Rename the diff cost function & generalize over records. 2016-07-14 14:14:21 -04:00
Rob Rix
2d910a6668 Placate hlint a little further. 2016-07-14 14:12:15 -04:00
Rob Rix
2826a7948a 🔥 a redundant definition. 2016-07-14 14:07:33 -04:00
Rob Rix
b9b0bda2bd 🔥 a redundant import. 2016-07-14 14:07:22 -04:00
Rob Rix
2a85ef7668 Placate hlint. 2016-07-14 14:07:15 -04:00
joshvera
1c65d03618 Output a diff summary for empty branch syntax nodes 2016-07-14 13:01:33 -04:00
joshvera
2ebbe72a76 Add Categorizable newtype for HasCategory (Record fields) 2016-07-14 11:52:03 -04:00
Rob Rix
02e836d364 Equate terms with respect to their categories. 2016-07-14 11:27:54 -04:00
Rob Rix
56fbaaf8e5 Merge branch 'master' into equal-term-costs 2016-07-14 09:52:45 -04:00
joshvera
27fab0b289 Merge remote-tracking branch 'origin/master' into pretty-print-summaries 2016-07-13 15:48:44 -04:00
Rob Rix
50c9d37cb1 Placate hlint. 2016-07-13 15:33:53 -04:00
Rob Rix
45b0571221 Add an Arbitrary instance over Range. 2016-07-13 15:33:44 -04:00
Rob Rix
a6eace739c Section header for instances. 2016-07-13 15:31:09 -04:00
Rob Rix
b45329e94b Add Arbitrary instances over Size and Cost. 2016-07-13 15:30:37 -04:00
Rob Rix
8b9e92440f Add an instance over empty records. 2016-07-13 15:28:58 -04:00
Rob Rix
636fbd102b Generalize the Arbitrary instance over Records of multiple fields. 2016-07-13 15:24:35 -04:00
Rob Rix
742f2fcc24 🔥 the set of keyed categories. 2016-07-13 15:02:26 -04:00
joshvera
59426b86f6 Add megaparsec to pretty print summaries 2016-07-13 14:32:53 -04:00
joshvera
7169a51265 Use wl-pprint-text to pretty print diff summaries 2016-07-13 11:58:43 -04:00
Rob Rix
4f967e0e1a 🔥 Data.OrderedMap. 2016-07-12 23:27:20 -04:00
Rob Rix
bc05e694a3 🔥 Keyed syntax nodes. 2016-07-12 23:27:09 -04:00
Rob Rix
c3f060d65b 🔥 ByKey operations. 2016-07-12 23:26:14 -04:00
Rob Rix
7370e927b8 Pattern guards. 2016-07-12 18:39:43 -04:00
Rob Rix
a1bfe55742 Handle ByKey using OrderedMap’s Align instance. 2016-07-12 18:20:31 -04:00
Rob Rix
7af6915a75 Align OrderedMap using the same logic as ByKey. 2016-07-12 18:20:19 -04:00
Rick Winfrey
177af03bd3 Merge branch 'master' into syntax-redux 2016-07-12 17:03:35 -05:00
Rob Rix
a327ab67a4 Export the OrderedMap constructor. 2016-07-12 17:57:58 -04:00
Rob Rix
89b7c451bf Parenthesize records where appropriate. 2016-07-12 17:55:49 -04:00
Rob Rix
a43400b920 Add field names to ArbitraryTerm. 2016-07-12 17:45:50 -04:00
Rob Rix
657d6dc72e Use the correct constructor. 2016-07-12 17:44:48 -04:00
Rob Rix
ccf78456f2 🔥 a redundant import. 2016-07-12 17:26:21 -04:00
Josh Vera
b801683254 Merge branch 'master' into ses-parallelism 2016-07-12 13:12:26 -04:00
Rob Rix
0ebfb1e441 Back out the SES parallelism stuff. 2016-07-12 09:51:41 -04:00
Rob Rix
a0a86a0d01 Merge branch 'master' into ses-parallelism
# Conflicts:
#	semantic-diff.cabal
#	src/Patch.hs
2016-07-12 09:50:02 -04:00
joshvera
38cf7bee62 Add regex tests 2016-07-11 16:18:10 -04:00
Rob Rix
36528d4b37 📝 galignAlign. 2016-07-11 15:39:33 -04:00
Rob Rix
56b248d390 Document the equality constraint. 2016-07-11 15:39:00 -04:00
Rob Rix
23b7fa4f87 Correct the docs for the GAlign instance over K1. 2016-07-11 15:38:17 -04:00
Rob Rix
63832980ba Non-parameter fields are only zipped if equal. 2016-07-11 15:37:48 -04:00
Rob Rix
cf3690f28a Implement recur using galign. 2016-07-11 15:35:13 -04:00
joshvera
904a5ae9ea Use alignWith diffThese instead of zipWith so we don't drop children when diffing 2016-07-11 15:26:08 -04:00
joshvera
68a14d0d74 Use null 2016-07-11 15:13:20 -04:00
Rob Rix
ce500a822f Define zipTerms using galign. 2016-07-11 15:13:16 -04:00
Rob Rix
06fce4f0ca 📝 the GAlign instances. 2016-07-11 14:55:39 -04:00
Rob Rix
d6dbc24056 Move the GAlign instance over Syntax a into its own section. 2016-07-11 14:52:13 -04:00
Rob Rix
ee60b4be7a Use galignAlign explicitly. 2016-07-11 14:51:09 -04:00
Rob Rix
45c0a582b8 Add a function implementing galign’s type using align. 2016-07-11 14:50:13 -04:00
Rob Rix
a7ee001f4d Move the Data.Align.Align implementations into their own section. 2016-07-11 14:48:39 -04:00
Rob Rix
8fb0ba59c6 📝 GAlign. 2016-07-11 14:47:12 -04:00
Rob Rix
f277956c55 Move the section header down. 2016-07-11 14:47:06 -04:00
Rob Rix
2c5810324a 🔥 the (bogus) pair implementation. 2016-07-11 14:46:57 -04:00
Rob Rix
b1b9806e61 📝 alignCofreeWith’s parameters. 2016-07-11 14:41:59 -04:00
Rob Rix
c830c818f4 📝 alignCofreeWith. 2016-07-11 14:33:51 -04:00
Rob Rix
2870cdf1dd Add a function parameter contrasting two terms into e.g. a patch. 2016-07-11 14:33:05 -04:00
Rob Rix
b4c6d92301 Rename c to combined. 2016-07-11 14:29:57 -04:00
Rob Rix
d9c5411568 Rename contrast to compare. 2016-07-11 14:27:38 -04:00
Rob Rix
42f18e9b4f Use the getters instead of destructuring. 2016-07-11 14:03:54 -04:00
Rob Rix
26757185d9 Use a more efficient pattern of recursion. 2016-07-11 14:03:05 -04:00
Rob Rix
40df2f9576 Add an annotation-combining function to alignCofreeWith. 2016-07-11 14:01:45 -04:00
Rob Rix
e23fa323db Rename some type parameters for tidiness’ sake. 2016-07-11 14:00:36 -04:00
Rob Rix
921d0d9356 Clean up the language extensions for the Term module. 2016-07-11 13:59:27 -04:00
Rob Rix
d1219d04f2 🔥 a redundant import. 2016-07-11 13:58:28 -04:00
Rob Rix
a9577a2037 🔥 the hand-rolled alignSyntax' function. 2016-07-11 13:57:53 -04:00
Rob Rix
ee260949ea Move GAlign into its own module. 2016-07-11 13:57:11 -04:00
Rob Rix
6c16a071bb Stub in a generic align module. 2016-07-11 13:55:27 -04:00
Rob Rix
119c2350d4 Use the Data.Align instances for generic alignment of lists and ordered maps. 2016-07-11 13:54:04 -04:00
joshvera
680fe1304c Delete or Insert entire diff if one side of the source blobs is empty 2016-07-11 12:57:10 -04:00
joshvera
1dfae9a1b9 Add Object/Pair/Commented/Comment cases to diffSummary 2016-07-11 12:56:00 -04:00
joshvera
6c58c1b50a Add Object/Pair/Comment to toTermName 2016-07-11 12:55:32 -04:00