Rob Rix
c1f1fb71c9
Unpack lists of children.
2016-06-22 10:12:59 -04:00
Rob Rix
f8f1a073f6
Produce the label at each node.
2016-06-22 10:02:44 -04:00
Rob Rix
2edbff580c
Abstract the unpacking function universally.
2016-06-22 10:02:01 -04:00
Rob Rix
228f5212ee
Unpack the label and children at each level.
2016-06-22 09:56:10 -04:00
Rob Rix
dda39902b2
Specialize the unpacking function type.
2016-06-22 09:56:01 -04:00
Rob Rix
91db911cd2
Stub in a function to compute the p,q-grams for a given tree.
2016-06-22 09:54:14 -04:00
Rob Rix
1d225b39ad
Qualify our imports.
2016-06-22 09:37:02 -04:00
Rob Rix
51f3d3d11d
Compute random Doubles instead.
2016-06-21 19:04:35 -04:00
Rob Rix
686f94d53e
Compute feature vectors from Bags of p,q-grams.
2016-06-21 18:50:06 -04:00
Rob Rix
226be486c8
Add a Random instance over Ratios.
2016-06-21 18:48:44 -04:00
joshvera
efc1ca7973
Add Ternary/MathAssignment/Operator cases to DiffSummary
2016-06-21 18:20:25 -04:00
Rob Rix
ce838de9b4
Bags are DLists.
2016-06-21 17:49:34 -04:00
joshvera
42cd6f98df
Add more cases to syntax ToMarkup instance
2016-06-21 17:31:57 -04:00
Rob Rix
0fb73b6d96
Grams are Hashable.
2016-06-21 17:29:49 -04:00
Rob Rix
87b9c1c8e2
Bags are Hashable.
2016-06-21 17:29:09 -04:00
joshvera
40b3f55776
Add more Diff.Arbitrary cases
2016-06-21 17:16:22 -04:00
joshvera
bf4c1e8221
Add Ternary case to Diff.Arbitrary
2016-06-21 17:13:24 -04:00
joshvera
0a574871c9
Merge remote-tracking branch 'origin/master' into syntax-redux
2016-06-21 17:08:40 -04:00
Rob Rix
0e88786666
Add a Monoid instance for Bags.
2016-06-21 16:58:46 -04:00
Rob Rix
e6036c0d76
Stub in Bags.
2016-06-21 16:58:38 -04:00
Rob Rix
53b53a7c8f
Serialize Grams to a flat list of labels.
2016-06-21 16:58:33 -04:00
Rob Rix
5df723fa5a
Stub in Grams.
2016-06-21 16:58:19 -04:00
Rob Rix
f8988adf3b
Stub in a module for Grams.
2016-06-21 15:19:44 -04:00
Rick Winfrey
eb638a974b
Provide JavaScript specific Operator categories for delete_op, type_op and void_op
2016-06-17 17:04:18 -05:00
Rick Winfrey
9b5d17b3be
Add support for Operator category in DiffSummary
2016-06-17 17:03:55 -05:00
Rick Winfrey
ee799b2b67
Add Operator case to run
2016-06-17 17:03:39 -05:00
Rick Winfrey
e8fcd3390e
Add Operator case to termConstructor
2016-06-17 17:03:27 -05:00
Rick Winfrey
5cb1a05f0d
Add Operator Syntax
2016-06-17 17:03:09 -05:00
Rick Winfrey
2432cd53cb
Add general Operator Category
2016-06-17 17:02:54 -05:00
Rick Winfrey
f2d5a2be04
Add Operator Category
...
Although we don’t currently receive operator productions from
TreeSitter directly, this is in anticipation of that.
2016-06-17 17:01:35 -05:00
Rick Winfrey
88dd8e3c6c
Add Ternary Category / Syntax to DiffSummaries
2016-06-17 15:33:22 -05:00
Rick Winfrey
74f1ff50b7
Add replacement run case for Ternary
2016-06-17 15:32:48 -05:00
Rick Winfrey
23903be464
Add Ternary termConstructor case
2016-06-17 15:32:23 -05:00
Rick Winfrey
ce54abd040
Add Ternary Syntax data constructor
2016-06-17 15:32:07 -05:00
Rick Winfrey
c4b068c370
Add missing comments
2016-06-17 15:31:50 -05:00
Rick Winfrey
638d0fa90b
Add Ternary Category
2016-06-17 15:31:40 -05:00
Rick Winfrey
76c4037933
Add support for MathAssignment Category and Syntax
2016-06-17 14:57:51 -05:00
Rick Winfrey
3de9bbda09
Add SubscriptAccess DiffSummary support
2016-06-17 14:40:33 -05:00
Rick Winfrey
1254c12798
Add SubscriptAccess to run
2016-06-17 14:40:21 -05:00
Rick Winfrey
3ac96be52c
Add subscript_access case for defaultCategoryName
2016-06-17 14:39:47 -05:00
Rick Winfrey
596d465c17
Add SubscriptAccess Syntax
2016-06-17 14:39:18 -05:00
Rick Winfrey
4f5141c59e
Add SubscriptAccess case to termConstructor
2016-06-17 14:38:50 -05:00
Rick Winfrey
34359f80ee
Add SubscriptAccess Category
2016-06-17 14:38:12 -05:00
Rob Rix
87552e0ecb
Generalize Alignment over annotations with ranges.
2016-06-17 14:07:35 -04:00
Rob Rix
8b5dc22797
🔥 SetField (roll it into HasField).
2016-06-17 14:07:21 -04:00
Rob Rix
27c17b20fe
Generalize getRange to work over any Record with a Range.
2016-06-17 14:06:55 -04:00
Rob Rix
0969e20f39
Generalize hasChanges to arbitrary annotations.
2016-06-17 14:05:38 -04:00
Rob Rix
03b8076f03
Show the underlying Integer, not the Size.
2016-06-17 13:56:45 -04:00
Rob Rix
978c91cd59
Fix setCost infinite looping.
2016-06-17 13:53:33 -04:00
Rob Rix
1668e94427
Define Info as a synonym over Data.Record.
2016-06-17 13:33:50 -04:00
Rob Rix
7d95cb48dc
Use the Cost & Size types in Info.
2016-06-17 13:30:48 -04:00
Rob Rix
37b59c89d7
Use the setter functions to update Info.
2016-06-17 13:28:35 -04:00
Rob Rix
5413e1ff43
Add setter functions for Info’s fields.
2016-06-17 13:23:54 -04:00
Rob Rix
fe00a94f52
Destructure Info using the field accessors.
2016-06-17 12:19:00 -04:00
Rob Rix
93f5d53cb4
🔥 the redundant ValueOf type family.
2016-06-17 11:51:03 -04:00
Rob Rix
10e4aefc26
🔥 the redundant IsField typeclass.
2016-06-17 11:50:56 -04:00
Rob Rix
3fb69066a5
Implement Record equality.
2016-06-17 11:50:18 -04:00
Rob Rix
844d093616
We don’t use GeneralizedNewtypeDeriving.
2016-06-17 11:50:10 -04:00
Rob Rix
01d8c6ed91
Derive Num instances for Size and Cost.
2016-06-17 11:33:22 -04:00
Rob Rix
e8c165fb15
Use mappend instead of ++.
2016-06-17 11:29:27 -04:00
Rob Rix
f6f067c638
Derive Eq & Show instances for Size & Cost.
2016-06-17 11:25:45 -04:00
Rob Rix
b8ddaaaaf0
Size/Cost are not just wrappers.
2016-06-17 11:22:22 -04:00
Rob Rix
263c96468c
Remove the obsolete type tag stuff.
2016-06-17 11:17:20 -04:00
Rob Rix
138f66ae0d
Don’t wrap Range & Category in newtypes.
2016-06-17 11:15:22 -04:00
Rob Rix
ed1b0b692d
We no longer require TypeOperators.
2016-06-17 10:45:41 -04:00
Rob Rix
9e88584726
Add setters.
2016-06-17 10:29:24 -04:00
Rob Rix
9ccd3d2d77
Implement Data.Record-based annotations.
2016-06-17 10:26:20 -04:00
joshvera
c60609fd83
Error out if we run into an unimplemented comparison
2016-06-16 16:35:52 -07:00
joshvera
af8e7a4d81
Add a Switch case to zipUnwrap
2016-06-16 16:35:52 -07:00
joshvera
0c1d749f32
Diff asymmetrical Switches recursively
2016-06-16 16:35:52 -07:00
joshvera
70441b9a93
s/cases/_
2016-06-16 16:35:52 -07:00
joshvera
b73cb5f478
Add a bunch of Syntax cases to run in Interpreter
2016-06-16 16:35:52 -07:00
joshvera
8bb9f23035
Add VarDecl/VarAssignment/Switch/Case cases to alignSyntax
2016-06-16 16:35:52 -07:00
Rob Rix
898a0cdbd3
Put the HasField/SetField instances together.
2016-06-16 17:44:06 -04:00
Rob Rix
c5ab897782
Split setField into a SetField typeclass.
2016-06-16 17:42:22 -04:00
Rob Rix
2f33dd06d1
HasField specifies a setter.
2016-06-16 17:37:04 -04:00
Rob Rix
047cc81f4f
IsField specifies a setter.
2016-06-16 17:34:36 -04:00
Rob Rix
856e3ed809
Abbreviate the infix RCons syntax.
2016-06-16 17:31:53 -04:00
Rob Rix
035969c176
Add instances for :=> as a field.
2016-06-16 17:02:26 -04:00
Rob Rix
2822ec2f51
Add a typeclass for fields.
2016-06-16 17:02:17 -04:00
Rob Rix
b18a30b441
Add a type family for monotypes.
2016-06-16 17:02:08 -04:00
Rob Rix
ba1fc277eb
Rework the constructors and eliminators a bit to not use tagged.
2016-06-16 16:41:43 -04:00
Rick Winfrey
21b7b5255c
Merge branch 'syntax-redux' of github.com:github/semantic-diff into syntax-redux
2016-06-16 15:34:55 -05:00
Rick Winfrey
d554636c5c
Add JavaScript specific "generator_function" case to map to Function Syntax
2016-06-16 15:34:48 -05:00
Rob Rix
dcf9cdc6ae
Add an eliminator for :=>.
2016-06-16 16:23:12 -04:00
Rob Rix
a08b83432f
Use GeneralizedNewtypeDeriving.
2016-06-16 16:20:16 -04:00
joshvera
7c8ac45c83
Zip Case statements in zipTerms
2016-06-16 10:39:57 -07:00
joshvera
185d386150
Add Case to termToDiffInfo
2016-06-16 10:39:57 -07:00
Rick Winfrey
513c3b7ec7
Assign arrow_function
productions as Function Syntax
2016-06-16 11:25:17 -05:00
Rob Rix
675cb59e14
:=> constructs a wrapper around Tagged.
2016-06-16 12:10:05 -04:00
Rick Winfrey
a2d8c23250
Add Boolean case for styleName
2016-06-16 11:08:34 -05:00
Rob Rix
39041fc8c3
Add an infix synonym for RCons.
2016-06-16 12:02:19 -04:00
Rob Rix
9ebf255da2
Use <>
instead of ++
.
2016-06-16 12:00:29 -04:00
Rob Rix
1bac0faf43
Add a Show instance for RCons.
2016-06-16 11:59:42 -04:00
Rob Rix
2475667df9
Define Show
for RNil.
2016-06-16 11:58:29 -04:00
Rob Rix
63ed038654
📝 why OVERLAPPABLE.
2016-06-16 11:58:17 -04:00
Rob Rix
cff9ac00ab
🎩 @aaronlevin.
2016-06-16 11:54:32 -04:00
Rob Rix
fd22620ccd
📝 HasField.
2016-06-16 11:53:21 -04:00
Rob Rix
c4eb6241cb
Move the HasField class to a section by itself.
2016-06-16 11:52:42 -04:00
Rob Rix
3b8c1546a5
Add HasField instances for hlists.
2016-06-16 11:52:14 -04:00
Rob Rix
eb91962cbb
📝 Record.
2016-06-16 11:50:43 -04:00
Rob Rix
4172f83842
Move the type tags to the bottom.
2016-06-16 11:49:42 -04:00
Rob Rix
afe112985b
Add the HasField typeclass.
2016-06-16 11:49:07 -04:00
Rob Rix
db035a8009
📝
2016-06-16 11:45:53 -04:00
Rob Rix
811b623652
Add a Record datatype.
2016-06-16 11:42:19 -04:00
Rob Rix
d596c02e74
:=> and field are shorthand for Tagged.
2016-06-16 11:40:43 -04:00
Rob Rix
d4b63443ab
Add a simple phantom type tagger.
2016-06-16 11:38:29 -04:00
Rob Rix
3809f3ee43
Stub in a Data.Record module.
2016-06-16 11:30:11 -04:00
Rick Winfrey
d8bfd5a629
Merge branch 'syntax-redux' of github.com:github/semantic-diff into syntax-redux
2016-06-16 09:57:11 -05:00
Rick Winfrey
f70bce09c2
Add true and false cases to defaultCategoryForNodeName
2016-06-16 09:55:13 -05:00
Rick Winfrey
6e3a2e2a4e
Add JavaScript language specific categories for this, undefined and null
2016-06-16 09:54:46 -05:00
Rick Winfrey
7292e6ebe4
Add Boolean category name
2016-06-16 09:54:20 -05:00
Rick Winfrey
70b3340302
Add Boolean Category
2016-06-16 09:54:05 -05:00
joshvera
6fea8145e4
Add Switch/Case to defaultCategoryForNodeName
2016-06-15 16:52:39 -07:00
joshvera
f1fd404826
Map tree-sitter nodes to Switch/Case
2016-06-15 16:52:20 -07:00
joshvera
243b366555
Add Switch/Case cases to diffSummary
2016-06-15 16:52:05 -07:00
joshvera
39d200ebdc
Add Switch/Case to HasCategory Category instance
2016-06-15 16:51:48 -07:00
joshvera
4fceda482d
Add a switch case to termToDiffInfo
2016-06-15 15:58:08 -07:00
joshvera
8e32dea21c
Not using this
2016-06-15 15:57:55 -07:00
joshvera
212c0cc1a8
Add Case/Switch to toTermName
2016-06-15 15:51:17 -07:00
joshvera
f28e50da8a
Add Switch/Case to Renderer.Split
2016-06-15 15:49:11 -07:00
joshvera
69e5fca7cb
Add Switch/Case to styleName
2016-06-15 15:49:02 -07:00
joshvera
6d2824475c
Add Switch/Case/VarDecl/VarAssignment to Renderer.JSON
2016-06-15 15:48:47 -07:00
joshvera
1875f0cbef
Add Switch and Case to Category
2016-06-15 15:48:27 -07:00
joshvera
e4e7168f3c
Add Switch/Case to Term.Arbitrary
2016-06-15 15:23:58 -07:00
joshvera
6e7c5eeb5a
Add Switch/Case to Syntax
2016-06-15 15:20:58 -07:00
joshvera
4bcf6afcf3
Add Switch/Case to Diff.Arbitrary
2016-06-15 15:20:49 -07:00
joshvera
4d3678b024
Replace toVarDecl's child categories with VarDecl
2016-06-15 15:10:11 -07:00
joshvera
2465fbe847
s/var declaration/variable
2016-06-15 15:09:44 -07:00
joshvera
615871ac8f
docs
2016-06-15 14:58:48 -07:00
joshvera
66ce5d0957
Add VarAssignment/VarDecl mappings to defaultCategoryForNodeName
2016-06-15 11:17:03 -07:00
joshvera
c8b921f52b
Add VarDecl/VarAssignment to Renderer.Split
2016-06-15 11:16:43 -07:00
joshvera
1ba11175f8
Add VarDecl/VarAssignment/TemplateString/Regex to Renderer.Split
2016-06-15 11:16:28 -07:00
joshvera
c3e8f9b22f
Add Args/VarDecl/VarAssignment cases to termToDiffInfo
2016-06-15 11:16:07 -07:00
joshvera
fe49717acd
Add VarAssignment/VarDecl/Args cases to diffSummary
2016-06-15 11:15:46 -07:00
joshvera
ccff70b6f6
Add Args/VarAssignment/VarDecl to HasCategory Category instance
2016-06-15 11:15:29 -07:00
joshvera
602ee1ab6c
Add Args case to toTermName
2016-06-15 11:15:09 -07:00
joshvera
2468d4c258
Add Term.Arbitrary cases for Args/VarDecl/VarAssignment/Assignment/MemberAccess
2016-06-15 11:00:36 -07:00
Rick Winfrey
a726ab5a73
Add support for Regex TreeSitter productions
2016-06-15 11:09:52 -05:00
Rick Winfrey
c15e7a6f9f
Match template_string TreeSitter production
2016-06-15 10:39:36 -05:00
Rick Winfrey
b3799b5191
Add TemplateString toCategoryName case
2016-06-15 10:39:18 -05:00
Rick Winfrey
2ba869fdc9
Add TemplateString Category
2016-06-15 10:38:16 -05:00
Rick Winfrey
30e4209fed
CBA -> ABC
2016-06-15 10:06:13 -05:00
joshvera
8b0e7b57d4
formatting
2016-06-14 17:48:04 -07:00
joshvera
6c3216533d
Add VarDecl/VarAssignment to toTermName
2016-06-14 17:47:51 -07:00
joshvera
1b1682c57c
Add VarDecl/VarAssignment to Syntax
2016-06-14 17:44:10 -07:00
joshvera
bc50df3cc6
Add VarAssignment/VarDecl cases to termConstructor
2016-06-14 17:44:01 -07:00
joshvera
df489c8ef2
Add VarDecl/VarAssignment cases to Diff.Arbitrary
2016-06-14 17:43:42 -07:00
joshvera
79fb347748
Add VarAssignment and VarDecl to Category
2016-06-14 17:43:26 -07:00
joshvera
2e87924f82
formatting
2016-06-14 15:46:26 -07:00
joshvera
ba0f6a2123
Remove If for now
2016-06-14 15:45:01 -07:00
joshvera
cc8c5708b3
Import Syntax qualified in Parser
2016-06-14 14:59:46 -07:00
joshvera
e817175173
Add MemberAccess and If to Diff.Arbitrary
2016-06-14 14:59:11 -07:00
joshvera
2e0f10d4cb
Add an If Syntax constructor
2016-06-14 14:49:03 -07:00
joshvera
deeffc8e3b
Qualify Syntax and remove Category comparison functions in Parser
2016-06-14 14:48:46 -07:00
joshvera
7e5866d038
Add an If expression
2016-06-14 14:48:07 -07:00
joshvera
c839aace33
Args docs
2016-06-14 14:37:02 -07:00
joshvera
c4de347ef7
what happens if we run out of vertical space?
2016-06-14 14:04:27 -07:00
joshvera
a911515456
Pattern match functions in MethodCalls better in toTermName
2016-06-14 14:01:52 -07:00
joshvera
45be0bc7ac
Map productions to Category.Args
2016-06-14 13:51:34 -07:00
joshvera
5a65983280
Update the MethodCall category when returning a cofree from termConstructor
2016-06-14 13:51:21 -07:00
joshvera
e5c73428ce
Call toTermName on MethodCall in termToDiffInfo
2016-06-14 13:50:54 -07:00
joshvera
d00f59e2cb
Use unwrap in toTermName
2016-06-14 13:50:34 -07:00
joshvera
41feb9e6e1
Add Assignment and Syntax cases to Diff.Arbitrary
2016-06-14 13:30:09 -07:00
joshvera
835c06ce9a
Add Assignment and MemberAccess cases to Renderer.JSON
2016-06-14 11:28:21 -07:00
joshvera
52992e5ee8
Prefix Args
2016-06-14 11:28:09 -07:00
joshvera
70cc97480b
s/Singletone/singleton
2016-06-14 11:27:59 -07:00
joshvera
4b52268f94
Add Assignment, MemberAccess, MethodCall, Args cases to alignSyntax
2016-06-14 11:27:48 -07:00
joshvera
307cdda0de
Add cases for methods and args
2016-06-14 09:53:35 -07:00
joshvera
a3b3bee219
Remove comment
2016-06-14 09:13:24 -07:00
joshvera
51c2b0a484
Add MethodCall cases to DiffSummary
2016-06-14 09:07:14 -07:00
joshvera
02b44bf12d
Add MethodCall cases to Term.Arbitrary and Diff.Aribitrary
2016-06-14 09:06:43 -07:00
joshvera
02b504fddc
Add MethodCall diff summary case
2016-06-14 09:06:43 -07:00
joshvera
2ba33189c4
Add MethodCall cases to Syntax and Category
2016-06-14 09:06:08 -07:00
joshvera
086466ab88
Add MethodCall cases to Renderer
2016-06-14 09:03:43 -07:00
joshvera
baa6c7a92f
dots
2016-06-14 09:03:43 -07:00
Rick Winfrey
c027cfc6ba
Add toTermName support for member access nodes containing function calls
2016-06-13 17:34:35 -05:00
Rick Winfrey
52863cc4e6
Construct DiffInfo for member access children
2016-06-13 17:34:07 -05:00
Rick Winfrey
b7f58cb89e
Move assignment tree sitter production
2016-06-13 17:33:17 -05:00
Rick Winfrey
8e68a9de37
Add MemberAccess production matching for TreeSitter
2016-06-13 17:33:01 -05:00
Rick Winfrey
99cb26a809
Improve documentation for Assignment Syntax
2016-06-13 17:32:41 -05:00
Rick Winfrey
b07955872b
Add Syntax MemberAccess
2016-06-13 17:32:23 -05:00
Rick Winfrey
2c613457d0
Add construction for Syntax.MemberAccess
2016-06-13 17:32:04 -05:00
Rick Winfrey
6024182b40
Add MemberAccess Category
2016-06-13 17:31:45 -05:00
Rick Winfrey
8b3d09a705
Add default category name for Assignment tree sitter terms
2016-06-13 16:32:57 -05:00
Rick Winfrey
b5905ddbf5
Add Parser support for Assignment category, and construct Assignment Syntax nodes
2016-06-13 16:32:36 -05:00
Rick Winfrey
4806d975eb
Add Assignment Syntax
2016-06-13 16:32:08 -05:00
Rick Winfrey
5c45210eed
Add DiffSummary Assignment cases
2016-06-13 16:32:00 -05:00
Rick Winfrey
17d72761ec
Add Assignment category
2016-06-13 16:31:32 -05:00
joshvera
41de1b69a3
Add zipUnwrap cases for FunctionCall and Function
2016-06-10 18:56:04 -04:00
joshvera
9dfd271186
Add Identifier case to styleName
2016-06-10 16:41:48 -04:00
Rick Winfrey
c3d50a7fda
Update term name of anonymous functions
...
When outputting an anonymous function summary, previously we output:
Added the 'anonymous function' function
This patch updates the term name so we don't duplicate the function category:
Added the 'anonymous' function
2016-06-10 15:01:32 -05:00
joshvera
80ac6fd3e4
Construct Functions that only have an identifier and a body
2016-06-10 15:25:09 -04:00
joshvera
ed1314b4d7
Add more mappings
2016-06-10 15:24:37 -04:00
joshvera
6bccfb7d2a
Map more categories to Categories
2016-06-10 15:20:13 -04:00
joshvera
fe270e5072
Pattern match on the right info in isIdentifier
2016-06-10 15:19:58 -04:00
joshvera
44dec2aa53
Add Identifier
2016-06-10 15:19:29 -04:00
joshvera
4a5f2546b1
Add Params and ExpressionStatements categories
2016-06-10 15:10:50 -04:00
joshvera
d20937f2b1
Parse functions
2016-06-10 15:10:37 -04:00
joshvera
4257f7a46f
Add a Function case to alignSyntax
2016-06-10 13:34:19 -04:00