Timothy Clem
05afc0b795
Use camelCase for filePaths argument name
2016-09-26 13:34:59 -07:00
Josh Vera
a5c0e0df84
Merge branch 'master' into improve-anonymous-function-summaries
2016-09-27 00:32:45 +09:00
Rob Rix
95490d7ff9
Rename wrapped to underlying.
2016-09-25 17:10:14 +09:00
Rob Rix
64b491345e
Rephrase in terms of Applicative primitives.
2016-09-25 17:08:40 +09:00
Rob Rix
ee80e76c1d
Use & instead of flipping $.
2016-09-25 17:06:00 +09:00
Rob Rix
853bf4352f
Rename the fields in Ap.
2016-09-25 16:25:06 +09:00
Rob Rix
6d44a9f891
fmap infix.
2016-09-25 16:23:31 +09:00
Rob Rix
217f51df73
📝 iterAp.
2016-09-25 16:22:14 +09:00
Rob Rix
9e026bbe71
Rename iter to iterAp.
2016-09-25 16:21:40 +09:00
Rob Rix
66142c7281
Correct the documentation for Algorithm.
2016-09-25 15:50:49 +09:00
Rob Rix
434e03a89e
Consolidate the annotation.
2016-09-25 15:33:55 +09:00
Rob Rix
b701aed781
Move the annotate call onto the next line.
2016-09-25 15:32:24 +09:00
Rob Rix
1edde9c593
Construct algorithms in a free Applicative.
2016-09-25 15:27:59 +09:00
Rob Rix
8fd5675756
Safety first.
2016-09-24 16:46:50 +09:00
Timothy Clem
58d99a76c2
Accept --no-index to compare two paths
2016-09-23 15:46:52 -07:00
Timothy Clem
67103ea731
Remove determiner and category name for these boolean statements
2016-09-23 10:24:47 -07:00
Timothy Clem
ba3342585b
Improve phrasing for anonymous functions
2016-09-21 14:12:10 -07:00
Timothy Clem
43b8d73cc2
Merge branch 'master' of https://github.com/github/semantic-diff into improve-anonymous-function-summaries
2016-09-21 13:40:55 -07:00
Timothy Clem
a6741fc93e
Refactor out 'space' from 'maybeParentContext'
2016-09-21 13:25:58 -07:00
Timothy Clem
94b6ed7249
Lean into some succinct haskell
2016-09-21 13:15:31 -07:00
Timothy Clem
a3f53ec152
Print anonymous function parameters
2016-09-20 13:58:16 -07:00
Timothy Clem
3a04ffd85a
New maybeParentContext for updated assignment phrasing
2016-09-20 11:04:20 -07:00
Timothy Clem
bf2c5966ba
Merge branch 'master' of https://github.com/github/semantic-diff into improve-number-summaries
2016-09-20 08:01:37 -07:00
Timothy Clem
68bdde79e6
Simplify determiner method and usage
2016-09-19 18:27:29 -07:00
Timothy Clem
140bd7860b
Pattern match leaf in branches for correct use of 'the'
2016-09-19 17:39:30 -07:00
Timothy Clem
57271f30b7
Extraneous parans
2016-09-19 16:09:19 -07:00
Timothy Clem
b215b30130
Clean up commented out code
2016-09-19 15:33:35 -07:00
Timothy Clem
0b2f26a077
Merge remote-tracking branch 'origin/master' into improve-number-summaries
2016-09-19 13:08:15 -07:00
Timothy Clem
0b02fe171f
Remove un-used imports
2016-09-19 08:50:10 -07:00
Timothy Clem
9dbb004085
Merge remote-tracking branch 'origin/master' into remove-breakdown-leaves-by-word
2016-09-19 08:35:19 -07:00
Timothy Clem
946047f1fe
Handle droping 'the' for numbers
2016-09-19 08:30:09 -07:00
Rob Rix
d260ea19c9
Add a Semigroup instance over Source.
2016-09-18 09:54:07 +09:00
Rob Rix
38d6bbe644
Merge branch 'master' into ghc8
2016-09-17 20:45:58 -04:00
Josh Vera
74d541fa61
Merge branch 'master' into improved-math-and-bool-operators
2016-09-17 12:01:13 -04:00
Timothy Clem
195f158230
Merge branch 'master' into number-literal
2016-09-16 16:08:13 -07:00
Timothy Clem
eadde3b9a8
Introduce a MathOperator
2016-09-16 15:20:55 -07:00
Timothy Clem
a1250e7896
s/BinaryOperator/BooleanOperator
2016-09-16 15:20:36 -07:00
Timothy Clem
e699057650
Update toCategory name for Ternary
2016-09-16 13:33:57 -07:00
Josh Vera
7f4031bc34
Merge branch 'master' into markdown
2016-09-16 14:51:33 -04:00
joshvera
d67f240f90
indentation
2016-09-16 12:03:31 -04:00
joshvera
48ba980c6a
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-16 11:56:22 -04:00
joshvera
0535744ebc
more imports
2016-09-16 11:48:58 -04:00
joshvera
6665f0b6b1
remove imports
2016-09-16 11:36:45 -04:00
joshvera
f026a2d2f1
Replace cofree with Term and TermF
2016-09-16 11:22:52 -04:00
joshvera
86a38579cd
indentation
2016-09-16 11:08:21 -04:00
joshvera
fd91ffa2c8
Replace alias some types to Diff f (Record fields)
2016-09-16 10:47:30 -04:00
joshvera
4f7ec950a2
Some documentation tweaks
2016-09-16 10:40:26 -04:00
joshvera
b3776d9dc5
Clean up extraneous docs
2016-09-16 10:17:14 -04:00
joshvera
16aae4d95d
Move a few declarations into Prologue
2016-09-16 10:14:51 -04:00
joshvera
0713b7ce98
Import hylo and cata
2016-09-15 23:32:54 -04:00
joshvera
45e920c74d
Indentation and use term type alias
2016-09-15 23:26:17 -04:00
Rob Rix
2a62dd7bfc
Merge branch 'master' into ghc8
...
# Conflicts:
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/chained-ca
llbacks.json
2016-09-15 18:40:04 -04:00
Rob Rix
025502729d
Correct for precedence.
2016-09-15 17:54:33 -04:00
joshvera
3960697916
whitespace
2016-09-15 16:50:44 -04:00
joshvera
c7eeb1e075
Add TermOrIndexOrNil in place of a partial tuple of these and the term
2016-09-15 16:47:11 -04:00
joshvera
3c888c6650
Add fineNearestNeighbourToDiff in order to update the State indices for SES mapped terms
2016-09-15 16:39:22 -04:00
joshvera
ac398aaec6
Change move bound back to 2
2016-09-15 15:25:19 -04:00
Rob Rix
57a7a01b77
Merge branch 'master' into do-while-diff-summaries
...
# Conflicts:
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/chained-ca
llbacks.json
2016-09-15 15:04:33 -04:00
joshvera
24e02273d1
Clean up some insertDiff
2016-09-15 14:17:38 -04:00
joshvera
3d36d0fc59
Make sure isInMoveBounds is less than the sum of previous + defaultMoveBound
...
And change defaultMoveBound to 1
2016-09-15 14:09:23 -04:00
joshvera
61fe492616
Start at the lowest index in fas
2016-09-15 13:45:46 -04:00
joshvera
0abd720206
Recur into the tail if after is empty
2016-09-15 13:18:10 -04:00
joshvera
c26260057a
Use insertDiff to insert Theses in front of ambigous This and Thats
2016-09-15 13:12:48 -04:00
joshvera
f21420cb3d
Revert "Keep track of indices as Indices instead of These"
...
This reverts commit 5eacda831ecc80b9f8c1ca31babf4a7bcd33dcbd.
2016-09-15 12:01:00 -04:00
joshvera
169024f02e
Keep track of indices as Indices instead of These
2016-09-15 11:34:51 -04:00
Rob Rix
a66133e40f
Merge branch 'master' into markdown
2016-09-15 10:32:56 -04:00
Rob Rix
980f89505e
🔥 more redundant constraints/imports.
2016-09-14 19:28:13 -04:00
Rob Rix
996f9f5fa7
Define <> locally.
2016-09-14 19:26:41 -04:00
Rob Rix
aa240c4e63
🔥 a slew of redundant constraints.
2016-09-14 19:23:54 -04:00
Rob Rix
fc43dd54a0
🔥 a redundant import.
2016-09-14 19:23:40 -04:00
Rob Rix
795b6acbea
🔥 half a function I didn’t mean to commit 😬
2016-09-14 19:21:04 -04:00
Timothy Clem
4645bbda08
Remove breakDownLeavesByWord entirely
2016-09-14 15:02:37 -07:00
Rob Rix
25f4fa4bcb
Mergeable implies Functor.
2016-09-14 17:13:10 -04:00
Rob Rix
ed2395b952
🔥 a redundant constraint.
2016-09-14 17:09:50 -04:00
Rob Rix
6dee6cdde9
Deal with some semigroups fallout.
2016-09-14 16:51:43 -04:00
Rob Rix
2e28d0d582
Data.These has its own Arbitrary instance these days.
2016-09-14 16:42:01 -04:00
Rob Rix
9f93b1090c
Corecursive, not Unfoldable.
2016-09-14 16:40:25 -04:00
Rob Rix
1df89950ab
Correct a conflict that got committed.
2016-09-14 16:39:33 -04:00
Rob Rix
e4505a8be0
Protolude has traceShowId now apparently.
2016-09-14 16:33:33 -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
joshvera
2d16172528
Add a compareTheseMonotone function to order insertions after deletions, and compare by index
2016-09-14 15:25:11 -04:00
joshvera
899906c1e5
Change index type from Int to These Int Int
2016-09-14 15:14:17 -04:00
joshvera
0ea1298f48
Insert SES diffs into their correct place
2016-09-14 14:58:11 -04:00
joshvera
2aed2534e9
Remove the double succ calls
2016-09-14 14:00:13 -04:00
joshvera
d1bf3d8aea
Change Index state back to -1 for insertions
2016-09-14 13:58:21 -04:00
joshvera
d5c04e209b
Cleanup lint messages
2016-09-14 13:31:36 -04:00
joshvera
1ba892e286
clean up eitherCutoff
2016-09-14 13:30:43 -04:00
joshvera
42e09d37fa
Remove traceShow of diff indices
2016-09-14 13:28:12 -04:00
joshvera
5a86fa09a8
Don't insert the entire diff at the cutoff, insert the sub-diff back in
2016-09-14 12:21:27 -04:00
joshvera
8dae819bcd
Set the index of the inserted term as the state and return its own index in insertion
2016-09-14 11:20:24 -04:00
joshvera
cc91bc27d5
Advance the index of the other side of the diffs twice when inserting an insertion or a deletion
2016-09-14 11:19:56 -04:00
joshvera
f6a3cbfa4f
Start index state from 0
2016-09-14 11:19:29 -04:00
Rob Rix
85bb9d577a
Revert "Move totalSpan into Source."
...
This reverts commit 3085a4efe5b6b3e8807df6a05db784afccab58e2.
2016-09-14 02:41:28 -04:00
Rob Rix
6b65574193
Correct the end column.
...
Oy vey.
2016-09-14 02:18:57 -04:00
Rob Rix
979abfefab
Avoid repeated Range computations.
2016-09-14 02:10:30 -04:00
Rob Rix
4a06d76054
Move cmarkParser to its own module.
2016-09-14 02:08:27 -04:00
Rob Rix
88865f2c09
Traverse nodes within their parent spans.
2016-09-14 02:04:38 -04:00
Rob Rix
da19d6672e
Use totalSpan to define errorNode.
2016-09-14 01:58:38 -04:00
Rob Rix
6317228466
Move totalSpan into Source.
2016-09-14 01:57:51 -04:00
Rob Rix
f30fe7b358
Trim out nodes without positions.
2016-09-14 01:56:25 -04:00
Rob Rix
89a769ca35
Convert between 0- and 1-indexed spans.
2016-09-14 01:45:17 -04:00
Rob Rix
27d4cc0775
🔥 an obsolete comment.
2016-09-14 01:44:52 -04:00
Rick Winfrey
8ccf703f5f
Update identifiable term to include MethodCall and DoWhile syntaxes constructors
...
- Unifies isIdentifiable and identifiable functions because
isIdentifiable is never applied on its own.
- Use lambda case and return partially constructed Identifiables.
2016-09-13 17:54:05 -05:00
Timothy Clem
5caee16318
Use ellipsis for Unidentifiable too
2016-09-13 12:45:00 -07:00
Rob Rix
baba6eec73
🔥 the unused outputPath field from DiffArguments.
2016-09-13 15:40:53 -04:00
Rob Rix
12302e17ed
Compute a Range for Markdown nodes.
2016-09-13 15:17:27 -04:00
Rob Rix
953bf3ba58
Stop hiding ++
, Source doesn’t export it any more.
2016-09-13 15:09:55 -04:00
Rob Rix
85fdc3a807
Correct the computation of the end index.
2016-09-13 15:04:25 -04:00
Rob Rix
03f3cc01d3
Abstract how lengths are summed.
2016-09-13 12:25:55 -04:00
Rob Rix
66f5d39021
Compute the end index.
2016-09-13 12:24:47 -04:00
Rob Rix
07247e83c0
Compute the start index.
2016-09-13 12:23:47 -04:00
Rob Rix
7dc8393953
📝 sourceSpanToRange.
2016-09-13 12:00:41 -04:00
Rob Rix
4603cea555
Stub in a SourceSpan -> Range conversion.
2016-09-13 11:58:55 -04:00
Rob Rix
2f0bd6d81f
nl at eof
2016-09-13 11:56:32 -04:00
Rob Rix
561d03b6ba
🔥 Source’s definition of ++.
2016-09-13 11:45:30 -04:00
Rob Rix
d7a3747545
Define mappend without reference to Source.++.
2016-09-13 11:44:18 -04:00
Timothy Clem
362859c315
Use ellipsis instead of ...
2016-09-13 08:37:51 -07:00
Rob Rix
587cb66ef9
Placate hlint.
2016-09-13 10:41:45 -04:00
Rob Rix
161d98521e
Placate -Werror.
2016-09-13 10:41:36 -04:00
Rob Rix
b4e6e1dbb8
Merge branch 'master' into markdown
2016-09-13 10:35:28 -04:00
Timothy Clem
68d932594e
Add in NumberLiteral category
2016-09-12 21:06:53 -07:00
Josh Vera
6b9d944b06
Merge branch 'master' into summarizing-pairs
2016-09-12 21:44:40 -04:00
Timothy Clem
1067aa02ca
Give object representation some spacing
2016-09-12 15:52:00 -07:00
Timothy Clem
03915ffb62
Only print key in Pair
2016-09-12 15:51:33 -07:00
Timothy Clem
5958cb5818
Start to print out arg name for pair value
2016-09-12 15:31:31 -07:00
joshvera
d3440439dc
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-12 14:55:20 -04:00
joshvera
ff118abf93
Add docs
2016-09-12 14:41:56 -04:00
joshvera
ab728fade1
s/a/leaf
2016-09-12 13:43:38 -04:00
Rob Rix
902a3f20d8
🔥 a redundant import.
2016-09-12 13:43:23 -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
a64775d214
Merge branch 'master' into abstract-the-functor-out-of-diff-and-term-type-synonyms
2016-09-12 09:05:20 -04:00
Rob Rix
72741b51c2
Merge branch 'master' into template-strings
2016-09-09 17:34:31 -04:00
Rick Winfrey
773308af9a
Prevent TemplateString Leaf nodes from being broken down by word
2016-09-09 16:23:54 -05:00
Rick Winfrey
67d5bec5ff
Format comment
2016-09-09 16:23:19 -05:00
joshvera
7bdf389481
Remove unused Eq annotation constraint
2016-09-09 14:54:42 -04:00
joshvera
dbb687b33e
Split Term and Diff into SyntaxTerm and SyntaxDiff types as well
2016-09-09 14:51:20 -04:00
Rob Rix
98637ad656
Generalize Term/TermF & Diff/DiffF over the functor.
2016-09-09 14:46:50 -04:00
joshvera
4b7f767918
Add UnmappedTerms and move Cofree f Record fields into UnmappedTerm to clean up types
2016-09-09 12:52:09 -04:00
joshvera
d3b6b8476a
Add type to insertion
2016-09-09 12:41:56 -04:00
joshvera
d3ad6940fc
s/kv/term
2016-09-09 12:36:48 -04:00
joshvera
e79c7a00a2
Indent findNearestNeighourTo type
2016-09-09 12:35:51 -04:00
joshvera
cce8cb66ec
Rename to sesDiffs
2016-09-09 12:13:24 -04:00
joshvera
2fc783893a
Trace the indices
2016-09-08 17:50:58 -04:00
joshvera
91646fae53
append SES diffs to RWS diffs and sort on their indices
2016-09-08 17:24:44 -04:00
joshvera
b51198393e
Prepend the diff if it's not a deletion/insertion
2016-09-08 17:13:32 -04:00
joshvera
f16874fe6c
Fold cutoff SES diffs together so we can run them through RWS later
2016-09-08 16:58:08 -04:00
Rick Winfrey
f00162f9c1
Readability changes
2016-09-08 15:22:31 -05:00
Rick Winfrey
92b243d454
Indentation
2016-09-08 15:22:05 -05:00
joshvera
f2ccad84c5
Remove hashDecorator
2016-09-08 15:18:08 -04:00
joshvera
6947c8cf9f
Remove Int constraint
2016-09-08 15:13:51 -04:00
joshvera
10de2b957d
Remove pqueue and xydiff stuff
2016-09-08 14:19:45 -04:00
joshvera
ace71c1471
Try a cutoff on each SES diff
2016-09-08 13:17:50 -04:00
joshvera
37f47b4030
Formatting
2016-09-08 12:42:15 -04:00
joshvera
45320eb1f7
Formatting
2016-09-08 12:40:51 -04:00
Rob Rix
d9cc6c324e
Merge branch 'master' into almost-pedantic-builds
2016-09-08 12:40:15 -04:00
joshvera
109cca099e
Add ghc-mod to stack.yaml so atom versions don't get out of sync
2016-09-08 12:40:01 -04:00
Rob Rix
bb6fba4a95
Drop the Args node from function calls.
2016-09-08 12:24:47 -04:00
joshvera
bc69a5efc4
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-08 12:04:29 -04:00
Rob Rix
38abf6b339
Merge branch 'master' into abstract-term-construction-out-of-parsing
...
# Conflicts:
# src/Parser.hs
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/switch-sta
tement.json
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/throw-stat
ement.json
2016-09-08 09:52:01 -04:00
Rob Rix
29e5b5d1da
Filter empty nodes out at the assignment of children.
2016-09-08 09:42:16 -04:00
Rob Rix
eccaab1fbd
Use record wildcards to destructure the source blob.
2016-09-08 09:40:00 -04:00
Rob Rix
8ff6b1aa96
Use $! instead of seq.
2016-09-08 09:39:19 -04:00
Rob Rix
e4a37940c0
Indent all the things.
2016-09-08 09:30:53 -04:00
Rob Rix
67fcf6c7de
Handle errors and all in a single clause.
2016-09-08 09:29:01 -04:00
joshvera
648b61a94f
Add doc to editDistanceUpTo
2016-09-07 19:46:23 -04:00
Timothy Clem
9661cad15f
Fix a couple of new warnings
2016-09-07 15:27:31 -07:00
Timothy Clem
4600436167
Merge remote-tracking branch 'origin/master' into almost-pedantic-builds
2016-09-07 15:24:41 -07:00
joshvera
6c09ff32be
Add comma_operator split Category
2016-09-07 15:00:49 -07:00
Rob Rix
1e9785fc67
Add a fallback term constructor for other languages.
2016-09-07 15:14:20 -04:00
Rob Rix
a1be4c2841
Map C productions into terms using a term constructor.
2016-09-07 15:11:55 -04:00
Rob Rix
cccd9e9cc6
Stub in a term constructor for C.
2016-09-07 15:10:49 -04:00
Rob Rix
fe7b83663a
Handle all the for statements in a single case.
2016-09-07 14:19:54 -04:00
Rob Rix
7a61659b5c
Support for_statement.
2016-09-07 14:17:23 -04:00
Rob Rix
c1f0854962
Handle the terminal comma operator case correctly.
2016-09-07 13:48:00 -04:00
Rob Rix
a01f704d6b
Resume setting the category on variable declarations.
2016-09-07 13:36:34 -04:00
Rob Rix
c194d4578a
Select the term constructor using the language.
2016-09-07 13:00:59 -04:00
Rob Rix
13527a035c
🔥 the old termConstructor function.
2016-09-07 12:25:09 -04:00
Rob Rix
baacee4ef9
Add operator support back in.
2016-09-07 12:11:21 -04:00
Rob Rix
9750b252ed
Rename the term constructor for JS.
2016-09-07 11:57:24 -04:00
Rob Rix
0c0a67ba65
Move javascriptTermConstructor into its own module.
2016-09-07 11:56:28 -04:00
Rob Rix
64edd14b1d
Stub in a module for JS-specific stuff.
2016-09-07 11:50:41 -04:00
Rob Rix
bd7fab0cd8
🔥 defaultCategoryForNodeName.
2016-09-07 10:31:58 -04:00
Rob Rix
18bcc8bd0c
🔥 categoriesForLanguage.
2016-09-07 10:31:52 -04:00
Rob Rix
71272090af
Merge branch 'master' into abstract-term-construction-out-of-parsing
2016-09-07 10:30:48 -04:00
Rob Rix
8fca7294d9
Don’t change the category in toVarDecl.
2016-09-07 09:16:41 -04:00
joshvera
fb8b0a8543
Add comma_operator split Category
2016-09-06 19:29:14 -04:00
joshvera
e7e4899691
Run SES before RWS
2016-09-06 18:03:30 -04:00
Rick Winfrey
59ee8eb002
Update constructor-call JSONTestCases
2016-09-06 16:07:21 -05:00
Rick Winfrey
fb8011e552
Merge branch 'enhance-test-case-generator' into display-function-call-args
2016-09-06 10:38:20 -05:00
joshvera
ca9eca1cf8
Remove Comment
2016-09-01 19:22:14 -04:00
joshvera
d16cdefe34
Keep a hash for every node instead of a vector
2016-09-01 16:58:24 -04:00
joshvera
daba1fb2ef
Drop equal terms before running rws
2016-09-01 15:41:09 -04:00
joshvera
a809a95c81
Annotate terms with hashes and stick the terms in a priority queue
2016-09-01 15:01:40 -04:00
joshvera
44892e4761
Use naive hash function for now
2016-09-01 14:33:24 -04:00
joshvera
271cb702e6
export hashDecorator
2016-09-01 14:31:23 -04:00
joshvera
b26e445081
Move pqGramDecorator under featureVectorDecorator
2016-09-01 13:04:02 -04:00
joshvera
bc5283cb53
Move unitVector under featureVectorDecorator
2016-09-01 13:03:25 -04:00
joshvera
7708985f12
Add hashDecorator
2016-09-01 13:02:05 -04:00
joshvera
2723b657a4
Derive Hashable for SourcePos, SourceSpan, and Syntax
2016-09-01 12:10:35 -04:00
Rick Winfrey
2ad87cd022
🔥 extra space
2016-08-31 16:57:32 -05:00
joshvera
05ab760f14
Add notes for xydiff + RWS
2016-08-31 16:20:38 -04:00
Rick Winfrey
a78a9be087
Move args smart constructor function to Arguments module
2016-08-31 15:11:33 -05:00
Rick Winfrey
b07d4d2cdf
Extract Arguments to its own module
2016-08-31 13:09:41 -05:00
Rob Rix
4533f13973
Stub in Markdown parsing using CMark.
2016-08-29 13:58:52 -04:00
Rob Rix
d006d4b64f
.md files are Markdown.
2016-08-29 12:48:26 -04:00
Rob Rix
3399702d0a
Add Markdown to Language.
2016-08-29 12:47:55 -04:00
Rick Winfrey
dbd118d734
Merge branch 'master' into display-function-call-args
2016-08-26 18:15:12 -05:00
Rick Winfrey
fdd56cc67d
🔥 hasIdentity and dependency on Category
...
We should use Syntax because we cannot guarantee that a given term’s
category will always match or correspond with its Syntax.
We also plan to move away from using Category all together, and relying
on Category here would only add more more work for us in the future.
2016-08-26 17:59:26 -05:00
Rick Winfrey
bf888f52f9
Add newlines for easier readability (and easier vim'ing)
2016-08-26 17:57:48 -05:00
Rick Winfrey
0c82459b84
Reuse identifiable constructor function for prependSummary
2016-08-26 14:43:55 -05:00
Rick Winfrey
4f2ec3c00d
Update method call syntax terms to use toArgName
when determining term names
2016-08-26 14:43:31 -05:00
Rick Winfrey
e8d3132696
Add identifiable constructor function
2016-08-26 14:42:25 -05:00
Rick Winfrey
8bda7645ee
Add Identifiable data type
2016-08-26 14:42:09 -05:00
joshvera
1d7bd1777e
Don't drop summaries from a Commented node's child term
2016-08-26 12:42:01 -04:00
Rick Winfrey
986d88e540
Add toArgName for function call args
2016-08-25 17:48:00 -05:00
Rob Rix
b5534682a8
Construct in javascriptTermConstructor.
2016-08-25 18:20:40 -04:00
Rob Rix
a32d410e8d
Construct method calls with the appropriate category name.
2016-08-25 18:15:21 -04:00
Rob Rix
0412660a68
Construct errors.
2016-08-25 18:15:09 -04:00
Rob Rix
7f122d357d
Construct classes.
2016-08-25 18:15:04 -04:00
Rob Rix
b54ddad3ab
Construct method definitions.
2016-08-25 18:15:00 -04:00
Rob Rix
5573a4104d
Construct array literals.
2016-08-25 18:14:52 -04:00
Rob Rix
92b9ccf318
Construct try/catch/finally statements.
2016-08-25 18:14:46 -04:00
Rob Rix
2b9fd26641
Construct constructors.
2016-08-25 18:14:34 -04:00
Rob Rix
f3609ce45a
Construct throw statements.
2016-08-25 18:14:28 -04:00
Rob Rix
d1e3b660a7
Construct do/while statements.
2016-08-25 18:14:24 -04:00
Rob Rix
d9c3a8a368
Construct while statements.
2016-08-25 18:14:18 -04:00
Rob Rix
2d84d69072
Construct for statements.
2016-08-25 18:14:12 -04:00
Rob Rix
643b038636
Construct if & if/else statements.
2016-08-25 18:14:06 -04:00
Rob Rix
10a8a85b5f
Construct pairs.
2016-08-25 18:13:54 -04:00
Rob Rix
75c120fad7
Construct object literals.
2016-08-25 18:13:50 -04:00
Rob Rix
e0b8c126ce
Construct case statements.
2016-08-25 18:13:45 -04:00
Rob Rix
901e7e7d31
Construct switch statements.
2016-08-25 18:13:40 -04:00
Rob Rix
65b5eaa081
Construct variable declarations.
2016-08-25 18:13:35 -04:00
Rob Rix
48fdd44d7c
Construct variable assignments.
2016-08-25 18:13:30 -04:00
Rob Rix
f45cbbbcfa
Construct arguments.
2016-08-25 18:13:25 -04:00
Rob Rix
e839e47ef4
Construct ternaries.
2016-08-25 18:13:20 -04:00
Rob Rix
91f15df0fd
Construct function/method calls.
2016-08-25 18:12:56 -04:00
Rob Rix
108061eb7b
Construct function definitions.
2016-08-25 18:12:18 -04:00
Rob Rix
6e76518348
Correct how switch statements are constructed.
2016-08-25 17:44:49 -04:00
Rob Rix
bc85108428
Construct comma operators.
2016-08-25 16:46:11 -04:00
Rob Rix
f3fd55108e
Construct leaf nodes.
2016-08-25 16:45:26 -04:00
Rob Rix
162ef460e8
Construct subscript accesses.
2016-08-25 16:43:18 -04:00
Rob Rix
d2188d58da
Construct member accesses.
2016-08-25 16:43:13 -04:00
Rob Rix
c407863787
Construct math assignments.
2016-08-25 16:41:39 -04:00
Rob Rix
0aaf176c5c
Pattern match on the name and children simultaneously.
2016-08-25 16:40:33 -04:00
Rob Rix
1fac7cba4b
Map assignments.
2016-08-25 16:38:35 -04:00
Rob Rix
50ce18e421
Copy the categories for JS productions into Parser.
2016-08-25 16:35:58 -04:00
Rob Rix
1fa9a9d133
Stub in a term constructor over production names.
2016-08-25 16:32:01 -04:00
Rob Rix
2121dd3071
🔥 ScopedTypeVariables.
2016-08-25 16:25:06 -04:00
Rob Rix
3416e4b350
Simplify CommaOperator handling.
2016-08-25 16:16:09 -04:00
Rob Rix
f80e06900e
Define termConstructor without construct.
2016-08-25 16:14:21 -04:00
Rob Rix
91762f1c76
Wrap up constructed terms in withDefaultInfo.
2016-08-25 16:05:49 -04:00
Rob Rix
459c251498
Construct terms in a single case expression.
2016-08-25 16:04:26 -04:00
joshvera
4064372873
Remove bodies from for statement diff summaries
2016-08-25 15:59:12 -04:00
Rob Rix
07c0d89805
Declare the export list for TreeSitter.
2016-08-25 15:42:30 -04:00
Rob Rix
333490dff0
Revert " 🔥 withDefaultInfo."
...
This reverts commit ac632639aaed5767828e9af80a9962781309c7da.
2016-08-25 15:42:18 -04:00
Rob Rix
74a5b34750
🔥 withDefaultInfo.
2016-08-25 15:38:52 -04:00
Rick Winfrey
44d08a0e11
Merge branch 'master' into display-function-call-args
2016-08-25 13:52:58 -05:00
joshvera
499f5da329
Export isBranchInfo and clean up some warnings
2016-08-25 12:22:58 -04:00
joshvera
a701de4b58
isErrorInfo/hasErrorInfo
2016-08-25 12:12:01 -04:00
joshvera
f4ba3847ba
BranchInfos have ErrorInfos if their branches have ErrorInfos
2016-08-25 12:09:44 -04:00
joshvera
7c394ff6dd
Union the inner maps
2016-08-24 17:07:43 -04:00
joshvera
b290e49000
Don't include keys if no changes or errors
2016-08-24 15:46:50 -04:00
joshvera
6026d03205
Remove redundant imports
2016-08-24 15:37:55 -04:00
joshvera
e58438f4d9
Return a Map Text [Map Text [Text]] from summaries
2016-08-24 15:27:54 -04:00
joshvera
e49c202241
Return a list of Either Error Text from diffSummaries
2016-08-24 15:27:18 -04:00
joshvera
d4d00ddc92
expand toSummaryKey cases
2016-08-24 14:30:29 -04:00
joshvera
cdb03dbf52
Revert ToJSON instance for Cost
2016-08-24 14:23:08 -04:00
joshvera
b8ebb10436
docs
2016-08-24 14:21:12 -04:00
joshvera
4cb26bb082
Docs for concatOutputs
2016-08-24 14:16:01 -04:00
joshvera
a93dbe1537
s/diffSummaries'/diffToDiffSummaries
2016-08-24 14:15:55 -04:00
joshvera
ec7bd00cca
Remove unused import
2016-08-24 14:07:52 -04:00
joshvera
8d98d8564b
indentation
2016-08-24 14:07:30 -04:00
joshvera
4d1b4dc073
Move concatJSON and concatSummaries into concatOutputs
2016-08-24 14:07:00 -04:00
joshvera
ceb664710b
Remove redundant constraints
2016-08-24 14:00:34 -04:00
joshvera
439724e430
Don't infix isPrefixOf
2016-08-24 13:59:34 -04:00
Rick Winfrey
0d389bdad4
Don't specially treat FunctionCall syntaxes when constructing DiffInfos. Allow them to be treated as default LeafInfo instances.
2016-08-24 12:20:08 -05:00
Rick Winfrey
a213a5844f
Show children term names for function calls when constructing diff summary statements
2016-08-24 12:18:57 -05:00
Rick Winfrey
e855ae6fde
Extract the args of a function call when constructing FunctionCall syntaxes
2016-08-24 12:18:14 -05:00
joshvera
d4f931e318
formatting
2016-08-23 18:35:35 -04:00
joshvera
341b0af86e
Remove unused langauge extensions
2016-08-23 18:33:57 -04:00
joshvera
9b886306ea
Partition based off new error prefix
2016-08-23 18:18:36 -04:00
joshvera
96b2107b87
Merge remote-tracking branch 'origin/master' into api-changes
2016-08-23 14:54:47 -04:00
Rob Rix
5cbbfa552a
Merge branch 'master' into empty-statements
2016-08-23 10:49:06 -04:00
Rick Winfrey
1207347658
Add JSON renderer case for AnonymousFunction
2016-08-22 18:58:56 -05:00
Rick Winfrey
ec5114c2e3
Update remaining DiffSummary cases for AnonymousFunction and Function
2016-08-22 18:58:37 -05:00
Rick Winfrey
b69b03e546
Function Syntaxes are no longer maybe ids
2016-08-22 18:58:17 -05:00
Rick Winfrey
526591935b
Add toTermName case for AnonymousFunction
2016-08-22 18:58:02 -05:00
Rick Winfrey
02e145d362
🔥 conditionals with hardcoded strings!
2016-08-22 18:57:29 -05:00
Rick Winfrey
985d8c6189
Construct AnonymousFunction and Function Syntaxes
2016-08-22 18:56:47 -05:00
Rick Winfrey
5cf03924f9
Function id no longer a Maybe
2016-08-22 18:56:20 -05:00
Rick Winfrey
b4c05feb63
Add AnonymousFunction Syntax constructor
2016-08-22 18:55:54 -05:00
Rick Winfrey
8a61e57eed
Make style names consistent (should use '_' instead of '-')
2016-08-22 18:55:34 -05:00
Rick Winfrey
2374cb8548
Remove overlapping CommaOperator case
2016-08-22 18:55:12 -05:00
Rick Winfrey
0823be3519
Conditionally omit a function name when an assignment occurs within an anonymous function closure.
2016-08-22 18:22:04 -05:00
joshvera
38fd0431f7
Fix semantic-git-diff-tests
2016-08-22 17:56:48 -04:00
joshvera
e018849279
Merge remote-tracking branch 'origin/master' into empty-statements
2016-08-22 16:48:23 -04:00
joshvera
795fce2073
s/Error/Diff Summary Error
2016-08-22 13:51:21 -04:00
joshvera
5aef25e612
Merge remote-tracking branch 'origin/master' into change-summary-errors
2016-08-22 10:36:14 -04:00
joshvera
24af60c80f
Remove uses of HashMap for rendering
2016-08-22 10:33:11 -04:00
joshvera
e551c60e91
Remove redundant imports
2016-08-22 10:32:43 -04:00
joshvera
9443a7a141
Remove duplicate ToJSON instance
2016-08-22 10:32:33 -04:00
joshvera
4cf93207d8
Remove ToJSON (Record fields) constraint
2016-08-22 10:32:24 -04:00
joshvera
58535489e8
Remove redundant imports
2016-08-22 10:32:09 -04:00
joshvera
1be78a5e0b
Export diffSummaries' for tests
2016-08-22 10:32:02 -04:00
joshvera
0122fc30ba
Merge remote-tracking branch 'origin/change-summary-errors' into api-changes
2016-08-22 09:38:18 -04:00
joshvera
a146ab752c
Remove SummaryOutput from isJSON
2016-08-22 09:27:28 -04:00
joshvera
4a02d604f2
Derive Show for Output
2016-08-22 09:27:13 -04:00
joshvera
7541160bc3
WIP
2016-08-21 21:51:48 -04:00
joshvera
130724d054
Partition changes and errors into { changes:, errors: }
2016-08-20 00:18:33 -04:00
joshvera
63fa0a44a0
Export diffSummaries :: Blob SourceBlob -> Diff leaf (Record fields -> [Text]
2016-08-20 00:18:00 -04:00
joshvera
08a2203665
Merge remote-tracking branch 'origin/benchmark-stats' into empty-statements
2016-08-19 17:37:18 -04:00
joshvera
bbc2c2b9b2
Add the empty statement
2016-08-19 15:53:04 -04:00
Rob Rix
4d86498092
Merge branch 'master' into change-summary-errors
2016-08-19 13:35:02 -04:00
Rob Rix
3ca3fab565
Merge branch 'intmap-intersections-in-rws' into finer-grained-rejection-of-candidate-matches
2016-08-19 13:18:37 -04:00
Rob Rix
78f5281264
📝 findNearestNeighbourTo.
2016-08-19 13:17:39 -04:00
Rob Rix
5c9e05c781
📝 the parameters/return of nearestUnmapped.
2016-08-19 13:16:00 -04:00
Rob Rix
b0c8f93d70
Add a type signature for findNearestNeighbourTo.
2016-08-19 13:12:59 -04:00
Rob Rix
b5c67da74b
Add a type signature for nearestUnmapped.
2016-08-19 13:10:35 -04:00
Rob Rix
716b0b44d6
Lower the default move bound to 2.
...
2 is a slightly less magical number than 3.
2016-08-19 12:51:59 -04:00
joshvera
e81040d11e
Merge remote-tracking branch 'origin/master' into change-summary-errors
2016-08-19 12:10:36 -04:00
Rob Rix
14aef5d3cd
Filter out-of-bounds candidates out of the unmapped elements of A.
2016-08-19 12:03:32 -04:00
Rob Rix
2068bdd22a
Extract the guard clause into a predicate.
2016-08-19 11:53:52 -04:00
Rob Rix
db6679a912
Use IntMap intersections to define nearestUnmapped.
2016-08-19 11:36:46 -04:00
Rob Rix
1385e9193f
🔥 a redundant import.
2016-08-19 11:35:32 -04:00
Rob Rix
1627ab0e26
🔥 a redundant binding.
2016-08-18 17:53:29 -04:00
Rob Rix
1b2271e479
Maintain IntMaps of unmapped elements.
2016-08-18 17:53:17 -04:00
Rob Rix
10ca6f60b6
Revert "Construct IntMaps of the lists of inputs."
...
This reverts commit 8d62477ee805d45603d6c84fdeea59b341153c00.
2016-08-18 17:49:40 -04:00
Rob Rix
124e7b51da
Revert "Traverse & delete remaining unmapped terms in IntMap."
...
This reverts commit 7f3f842657b8cd9b1e5c60ae81e5fcaa44f1b1e4.
2016-08-18 17:49:33 -04:00
Rob Rix
bff81035d8
Traverse & delete remaining unmapped terms in IntMap.
2016-08-18 17:41:27 -04:00
Rob Rix
3e94a6a9dd
Construct IntMaps of the lists of inputs.
2016-08-18 17:28:35 -04:00
Rob Rix
a83faecdfd
So, apparently 3 is the magic number today.
2016-08-18 17:04:10 -04:00
Rob Rix
d4cbba043d
Disallow moves beyond a given bound.
...
🎩 @rewinfrey
2016-08-18 16:59:57 -04:00
joshvera
1aec6d801a
Merge remote-tracking branch 'origin/master' into change-summary-errors
2016-08-18 15:23:38 -04:00
Rob Rix
6765a9e764
Use the default parameters when diffing.
2016-08-18 14:04:25 -04:00
Rob Rix
1473c10659
Add a defaultFeatureVectorDecorator function.
2016-08-18 14:02:48 -04:00
Rob Rix
900a0b7a1f
Use the global l/m defaults.
2016-08-18 14:00:40 -04:00
Rob Rix
3e01b1cd13
Add bindings for the default values of the variables.
2016-08-18 13:59:34 -04:00
Rob Rix
2706ed262e
Rename constantTimeEditDistance to editDistanceUpTo.
2016-08-18 13:44:27 -04:00
Rob Rix
627ae0552c
Revert "Extract a Comparator type synonym."
...
This reverts commit 1aa2b093f0f45815b73c8ad172cf507d2d7ed6ec.
2016-08-18 12:54:52 -04:00
Rob Rix
3fb0ba5ddf
constantTimeEditDistance takes a diff.
2016-08-18 12:54:41 -04:00
Rob Rix
f49527a268
Export constantTimeEditDistance.
2016-08-18 12:50:15 -04:00
Rob Rix
ddbcb0cd18
Roll diffCostOfMaybes into constantTimeEditDistance.
2016-08-18 12:50:03 -04:00
Rob Rix
e063d7e0cd
constantTimeEditDistance is computed over terms.
2016-08-18 12:49:17 -04:00
Rob Rix
a184d5ad4b
Extract constantTimeEditDistance to the top level.
2016-08-18 12:48:13 -04:00
Rob Rix
f2c5e88801
Extract a Comparator type synonym.
2016-08-18 12:48:01 -04:00
Rob Rix
29a0db2675
📝 l & m.
2016-08-18 12:42:57 -04:00
Rob Rix
ab2dfacab6
Bind a variable for m.
2016-08-18 12:38:39 -04:00
Rob Rix
0c4921b58c
Bind a variable for l.
2016-08-18 12:38:28 -04:00
Rob Rix
3832a7b90f
📝 constantTimeEditDistance.
2016-08-18 12:35:24 -04:00