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

837 Commits

Author SHA1 Message Date
Rob Rix
f7932c2331 Correct the wording for JSON summaries. 2017-05-11 16:37:17 -04:00
Rob Rix
f2ca4b5144 Represent patched content as Entry constructors. 2017-05-11 16:33:52 -04:00
Rob Rix
1bbcbf7fab Keep the found entry. 2017-05-11 16:05:56 -04:00
Rob Rix
95f6a63fee Define diffTOC in terms of tableOfContentsBy. 2017-05-11 16:02:24 -04:00
Rob Rix
8ef8115775 Define a Listable instance for Declaration. 2017-05-11 15:48:27 -04:00
Rob Rix
7903db7429 Copy the deduping logic into dedupe. 2017-05-11 15:36:25 -04:00
Rob Rix
336e203d02 Define a helper to get an entry’s payload. 2017-05-11 15:36:02 -04:00
Rob Rix
1ec4b051b0 Pull the dedupe function out. 2017-05-11 15:25:12 -04:00
Rob Rix
023320bade 🔥 a redundant import of Patch. 2017-05-11 15:22:58 -04:00
Rob Rix
1a2c329f78 Crosswalk through Patches again. 2017-05-11 14:22:39 -04:00
Rob Rix
344bff67ce Produce parse error content. 2017-05-11 14:17:48 -04:00
Rob Rix
075b831199 Produce results for terms with syntax errors. 2017-05-11 14:13:54 -04:00
Rob Rix
eb03a36db0 Construct ErrorSummary values when the category is a parse error. 2017-05-11 14:11:49 -04:00
Rob Rix
cd2421048c Produce entries for parse errors. 2017-05-11 14:02:25 -04:00
Rob Rix
120e76a865 🔥 the old toc function. 2017-05-10 16:10:20 -04:00
Rob Rix
bb634a5e51 Don’t produce valid JSON summaries in the presence of errors. 2017-05-10 15:57:41 -04:00
Rob Rix
72faa30494 Invert the sense of the valid/error predicate. 2017-05-10 15:55:10 -04:00
Rob Rix
70b093392a Swap toc/toc2. 2017-05-10 15:46:04 -04:00
Rob Rix
f3392042e7 Derive Generic & NFData instances for Declaration. 2017-05-10 15:11:59 -04:00
Rob Rix
8930f8d1ff Rename the entries binding. 2017-05-10 14:29:28 -04:00
Rob Rix
11a1fa9f6f Clarify diffAlgebra substantially. 2017-05-10 14:28:10 -04:00
Rob Rix
066b2cb965 Define a toc2 function depending on declarations in the annotations. 2017-05-10 14:00:58 -04:00
Rob Rix
13d088e6b8 Define a function to compute a JSONSummary from an Entry. 2017-05-10 13:18:47 -04:00
Rob Rix
284f358d7a Align the field selectors. 2017-05-10 12:40:07 -04:00
Rob Rix
f7e52a2934 Combine Declaration/DeclarationType. 2017-05-10 12:39:12 -04:00
Rob Rix
f20d0464ee 🔥 ClassDeclaration, since we never use it. 2017-05-10 12:29:02 -04:00
Rob Rix
38010818b0 📝 declarationAlgebra. 2017-05-10 12:10:46 -04:00
Rob Rix
6228c9ac40 Define an algebra to compute declarations for terms. 2017-05-10 12:09:43 -04:00
Rob Rix
ea7de8e68b 📝 declaration. 2017-05-10 12:01:26 -04:00
Rob Rix
9eac08919f Simplify declaration to accept any node with a Declaration attached. 2017-05-10 12:00:13 -04:00
Rob Rix
63482dc151 Define a function selecting the annotations of nodes representing declarations. 2017-05-10 11:58:08 -04:00
Rob Rix
fdcf96cd4c Define a type for declarations. 2017-05-10 11:57:28 -04:00
Rob Rix
40d8a7ac5c Export Entry. 2017-05-10 11:57:10 -04:00
Rob Rix
ca14a5ef90 Reformat the exports list. 2017-05-10 11:56:06 -04:00
Rob Rix
6577852d75 Generalize tableOfContentsBy over the annotation type. 2017-05-10 11:47:19 -04:00
Rob Rix
14f6c8c2c2 Revert "Invert the patches using the Crosswalk instance."
This reverts commit 7bd6285475bfd94ee2e3d714e610194b5dda7d03.
2017-05-10 11:26:48 -04:00
Rob Rix
b021910df6 Represent changes inside/outside of patches with different constructors. 2017-05-10 10:34:00 -04:00
Rob Rix
4f0fee6d2c 📝 the Entry constructors. 2017-05-10 10:27:50 -04:00
Rob Rix
d21c408af3 📝 Entry. 2017-05-10 10:24:43 -04:00
Rob Rix
bc5b6acf04 📝 the arguments to tableOfContentsBy. 2017-05-10 10:24:16 -04:00
Rob Rix
a2356def79 📝 tableOfContentsBy. 2017-05-10 10:21:00 -04:00
Rob Rix
37f8afdf7f Reformat the tableOfContentsBy signature. 2017-05-10 10:20:51 -04:00
Rob Rix
e4556e2ae2 Export tableOfContentsBy. 2017-05-10 10:05:29 -04:00
Rob Rix
fe18e38284 Replace tableOfContentsBy’s predicate with a map onto the values of entries. 2017-05-10 10:05:12 -04:00
Rob Rix
86f852c8f0 Simplify tableOfContentsBy. 2017-05-10 10:00:20 -04:00
Rob Rix
0534c3303d Define a function to compute the table of contents for a diff given some relevance predicate. 2017-05-10 09:55:05 -04:00
Rob Rix
bf2a12cbf4 Invert the patches using the Crosswalk instance.
This acts like a zip rather than like the cartesian product.
2017-05-10 08:50:33 -04:00
Rob Rix
617cbf681e Revert "Don’t pattern match against the term functor."
This reverts commit e30138d20144257a49d93b8ec2e2af54f551422a.
2017-05-09 13:54:22 -04:00
Rob Rix
55907f4ee0 Revert "Pass the term functor to identifierFor."
This reverts commit 59f1f1ba0affe5c782bda7d11b8411026b70d781.
2017-05-09 13:53:51 -04:00
Rob Rix
6c9d7d03bf Revert "Unwrap TermFs recursively."
This reverts commit d5738afaebd32eb65c0fc1dc249df8c952bdfd54.
2017-05-09 13:53:40 -04:00
Rob Rix
b0aae13648 Unwrap TermFs recursively. 2017-05-09 13:48:55 -04:00
Rob Rix
1474c63c12 Pass the term functor to identifierFor. 2017-05-09 13:43:39 -04:00
Rob Rix
0a522a386d Don’t pattern match against the term functor. 2017-05-09 13:39:49 -04:00
Rob Rix
118e94a2a7 Merge branch 'master' into generalize-table-of-contents-over-the-syntax-functor 2017-05-09 13:21:49 -04:00
Rob Rix
3c6d311255 🔥 a type signature mentioning Syntax. 2017-05-09 12:51:26 -04:00
Rob Rix
dde54fed6f Move diffSource into the where clause. 2017-05-09 12:44:02 -04:00
Rob Rix
fd3dded127 Extract toInfo to the top level (again). 2017-05-09 12:40:18 -04:00
Rob Rix
a4a2425ada Use a single code path for diff/term source. 2017-05-09 12:09:02 -04:00
Rob Rix
e578772376 More straightforward computation of the source for a given diff/term. 2017-05-09 12:04:25 -04:00
Rob Rix
58ed93f559 Don’t call toTermName for Pure nodes. 2017-05-09 11:58:35 -04:00
Rob Rix
a3ac8c308a Don’t call toTermName for Free nodes. 2017-05-09 11:56:03 -04:00
Rob Rix
490820c79d 🔥 InSummarizable. 2017-05-09 11:16:17 -04:00
Rob Rix
d38b76f554 Reformat TOCSummary a bit further. 2017-05-09 11:13:17 -04:00
Rob Rix
c08bfe5e07 Represent parse errors with Nothing. 2017-05-09 11:08:18 -04:00
Rob Rix
239105b5fe Combine DiffInfo’s constructors. 2017-05-09 11:02:15 -04:00
Rob Rix
fd618537a4 Clean up how we summarize leaf infos. 2017-05-09 10:28:16 -04:00
Rob Rix
901b67ca53 Factor the TOCSummary construction out. 2017-05-09 10:26:32 -04:00
Rob Rix
636b51ed92 Reformat TOCSummary. 2017-05-09 10:07:21 -04:00
Rob Rix
af5db72165 Tighten up labelling dupes. 2017-05-09 10:06:14 -04:00
Rob Rix
41e205639f Simpler term name computation. 2017-05-08 17:41:59 -04:00
Rob Rix
e1093344a7 Simplify contextualization. 2017-05-08 17:39:21 -04:00
Rob Rix
c369867230 Simplify toJSONSummaries. 2017-05-08 17:16:48 -04:00
Rob Rix
28d858ce32 Use record syntax for every case in toInfo. 2017-05-08 17:14:21 -04:00
Rob Rix
f33f2d6622 Flatten various branches with foldMap. 2017-05-08 17:11:03 -04:00
Rob Rix
ac832e9e4c fmap with fewer parens. 2017-05-08 17:09:37 -04:00
Rob Rix
48457f13cc s/toTOCSummaries/summarize/ 2017-05-08 16:52:03 -04:00
Rob Rix
a9b7903d8e Contextualize ToC summaries in a foldMap. 2017-05-08 16:41:10 -04:00
Rob Rix
f41a5f120b 🔥 BranchInfo. 2017-05-08 16:00:29 -04:00
Rob Rix
51d548cb0a 🔥 flattenPatch.
traverse has different semantics, but I’m pretty sure the zipWith was problematic.
2017-05-08 15:50:13 -04:00
Rob Rix
967ded76a8 Move toTOCSummaries & termToDiffInfo into diffTOC. 2017-05-08 15:47:51 -04:00
Rob Rix
9750fa35ec Map patches to ToC summaries without a second pass. 2017-05-08 15:20:22 -04:00
Rob Rix
03fc463c5c Format Summarizable across several lines. 2017-05-08 15:11:12 -04:00
Rob Rix
2d6c485ace Tighten up how we compute the summary key. 2017-05-08 13:21:40 -04:00
Rob Rix
d74c5fc2d2 🔥 ScopedTypeVariables. 2017-05-08 11:37:20 -04:00
Rob Rix
60782087de 🔥 a redundant forall. 2017-05-08 11:37:10 -04:00
Rob Rix
cba78c805f Specialize the leaf type. 2017-05-08 11:36:45 -04:00
Rob Rix
92be6ee6d1 Use the full types diffs & terms. 2017-05-08 11:35:34 -04:00
Rob Rix
b3fcde2abb Avoid indirection for error summaries. 2017-05-08 11:32:25 -04:00
Rob Rix
3cede7da09 Represent NotSummarizable as Nothing. 2017-05-08 11:31:30 -04:00
Rob Rix
821b598e2a Further tighten toTermName. 2017-05-08 11:24:25 -04:00
Rob Rix
6e411c7c85 Compute toTermName as a paramorphism. 2017-05-08 11:22:04 -04:00
Rob Rix
1b487b6907 🔥 offsetting in toTermName.
toTermName is a shallow traversal, so there’s little or no point in offsetting before recursive calls.
2017-05-08 11:18:23 -04:00
Rob Rix
2e98b4570d Contextualize summaries in diffToTOCSummaries directly. 2017-05-08 11:16:37 -04:00
Rob Rix
9df2a73e38 Tighten up toTermName. 2017-05-08 11:16:23 -04:00
Rob Rix
76002f08c0 🔥 redundant parens. 2017-05-08 09:56:11 -04:00
Rob Rix
f3cf3cb1d1 🔥 SummarizableTerm. 2017-05-08 09:55:56 -04:00
Rob Rix
4274fdf6e3 Merge branch 'master' into generalize-alignment-over-the-syntax-functor 2017-05-08 08:28:01 -04:00
Rob Rix
8d8fa78b47 Simplify summarizable. 2017-05-05 16:34:16 -04:00
Rob Rix
0c7af370f7 Define termToDiffInfo as a paramorphism. 2017-05-05 16:28:46 -04:00
Rob Rix
c73a79eb83 No need to qualify sourceSpan. 2017-05-05 16:19:49 -04:00