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

115 Commits

Author SHA1 Message Date
Rob Rix
301266a237 📝 foldDiff/foldDiffWith. 2017-05-08 12:48:49 -04:00
Rob Rix
2471b15e0d Reformat the type signatures. 2017-05-08 12:44:36 -04:00
Rob Rix
d2f71809e6 Swap the order of the merge & algebra parameters. 2017-05-08 12:43:29 -04:00
Rob Rix
c6172239dd s/Monoid/Semigroup/ 2017-05-08 12:42:56 -04:00
Rob Rix
6f56bc980a Define a convenience wrapper for foldDiffWith when the result is a Monoid. 2017-05-08 12:42:36 -04:00
Rob Rix
a4cb5c5a30 Add a merging function to foldDiff. 2017-05-08 12:41:26 -04:00
Rob Rix
9fee3b2bc5 🔥 modifyAnnotations. 2017-05-08 11:54:50 -04:00
Rob Rix
4fe2a4cec1 Simplify mapAnnotations with the Bifunctor instance. 2017-05-08 11:53:23 -04:00
Rob Rix
d1c9c69ed8 🔥 ScopedTypeVariables. 2017-05-08 11:52:36 -04:00
Rob Rix
535403e326 Define an eliminator for diffs. 2017-05-08 11:46:12 -04:00
Timothy Clem
94dc2ac506 Implement NFData instances so we can deepseq 2017-03-13 16:46:52 -07:00
Timothy Clem
e3bdb6b95b Extract SemanticDiff.IO and clearly delineate program commands 2017-02-28 13:43:01 -08:00
Rob Rix
7d284252c5 Migrate semantic-diff to lts-8.0. 2017-02-13 17:25:45 -05:00
Rob Rix
d9e44ede6c 📝 modifyAnnotations. 2017-02-08 12:04:05 -05:00
Rob Rix
051916082a Correct a misleading comment. 2017-02-08 12:03:50 -05:00
Rob Rix
f19a1fdfbf Add a function to modify the annotation of a top-level diff node. 2017-02-08 12:03:10 -05:00
Rob Rix
9a39762d91 📝 the generalization. 2017-02-07 15:27:13 -05:00
Rob Rix
7263b683e5 Generalize the type of mapAnnotations slightly. 2017-02-07 15:27:13 -05:00
Rob Rix
bb46960dd8 📝 mapAnnotations. 2017-02-07 15:27:13 -05:00
Rob Rix
4a3dd9afd8 Define a function for mapping over the annotations in a diff. 2017-02-07 15:27:13 -05:00
joshvera
580fa11bd6 Clean up diffFiles 2016-10-21 18:00:04 -04:00
Rick Winfrey
bd9fb81037 Consolidate back to single functions, passing in a function to extract the correct Annotation 2016-10-20 17:19:42 -05:00
Rick Winfrey
85a3864a96 Remove unused function 2016-10-20 16:34:54 -05:00
Rick Winfrey
c91fd3270d Use new afterTerm behavior for all semantic-diff 2016-10-20 16:33:47 -05:00
Rick Winfrey
e68be8e3b8 Take the after annotation when we take the afterTerm 2016-10-20 16:22:45 -05:00
joshvera
bfe57829d6 Merge remote-tracking branch 'origin/master' into rws-large-diffs 2016-09-27 10:34:19 -04:00
joshvera
0535744ebc more imports 2016-09-16 11:48:58 -04:00
Rob Rix
25f4fa4bcb Mergeable implies Functor. 2016-09-14 17:13:10 -04:00
Rob Rix
62196878fa Merge branch 'master' into ghc8
# Conflicts:
#	semantic-diff.cabal
#	src/Diff.hs
#	src/Term.hs
#	src/Term/Arbitrary.hs
#	stack.yaml
#	tools/semantic-git-diff/src/SemanticDiff.hs
2016-09-14 16:12:47 -04:00
Rob Rix
2b933904c9 Add specializations of Term/TermF/Diff/DiffF/SplitDiff over Syntax/Record. 2016-09-12 13:40:22 -04:00
Rob Rix
98637ad656 Generalize Term/TermF & Diff/DiffF over the functor. 2016-09-09 14:46:50 -04:00
joshvera
2df90eada7 Account for false positive close terms
Improve nearestUnmapped by looking up the nearest unmapped term which is not a false positive. We look up the nearest unmapped terms closest to the query term, then sort by the constant time edit distance between the query term and the intersecting terms. Finally, we select the first term that has the lowest edit distance.
2016-08-17 16:34:58 -04:00
Rob Rix
9ae7f52e8f Rename Sequenceable to Mergeable. 2016-07-22 17:38:10 -04:00
Rob Rix
dd0e4d890f Define mergeMaybe’s algebra using sequenceAlt. 2016-07-22 15:32:11 -04:00
Rob Rix
22476895c6 Define mergeMaybe’s algebra by iteration.
This is a restricted class of catamorphism which happens to line up
exactly with what we’re doing here.
2016-07-22 15:31:10 -04:00
Rob Rix
bc05e694a3 🔥 Keyed syntax nodes. 2016-07-12 23:27:09 -04:00
Rob Rix
baafd5f7a8 📝 mergeMaybe, beforeTerm, and afterTerm. 2016-07-05 09:45:28 -04:00
Rob Rix
5ea93ba8de 🔥 merge. 2016-07-05 09:43:03 -04:00
Rob Rix
e914685790 Don’t warn of orphans so much. 2016-06-30 12:59:26 -04:00
Rob Rix
41902045b4 Define an afterTerm function over diffs. 2016-06-27 12:50:25 -04:00
Rob Rix
8fcbaa3a7e Define beforeTerm via mergeMaybe. 2016-06-27 12:50:10 -04:00
Rob Rix
8f7307c989 Add a partial merge function. 2016-06-27 12:49:44 -04:00
Rob Rix
9829d2df84 Add a merge function to compute a Term from a Diff. 2016-06-27 12:37:27 -04:00
Rob Rix
3f6cab2abc Add a function to compute the before state of a diff. 2016-06-27 12:02:25 -04:00
joshvera
ef6b174c7d Merge remote-tracking branch 'origin/master' into ghc8 2016-06-15 10:10:07 -07:00
Rob Rix
a613fa0369 Merge branch 'push-benchmarks-to-graphite' into benchmark-alignment 2016-06-06 11:36:48 -04:00
Rob Rix
7802d4916c 🔥 FlexibleInstances & RecordWildCards pragmas. 2016-06-03 16:02:06 -04:00
Rob Rix
39ddbfc60f Add the DiffF type synonym back in. 2016-05-31 20:16:19 -04:00
joshvera
dcd8b0de32 Bump to lts nightly for ghc-8.0 2016-05-27 13:10:04 -04:00
joshvera
9d9fbe3c37 🔥 annotate and unfix 2016-05-26 14:46:13 -04:00