1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
Commit Graph

3099 Commits

Author SHA1 Message Date
joshvera
956f821a13 Start parsing Object literals 2016-06-23 17:39:27 -04:00
Rob Rix
1dac9cfb08 Diff against nearest neighbours. 2016-06-23 16:46:58 -04:00
Rob Rix
b5f9d94e80 Pass a getLabel function to rws. 2016-06-23 16:34:43 -04:00
Rob Rix
c1a2617fa1 Interpretation must operate over terms with extensible annotations. 2016-06-23 16:34:13 -04:00
Rob Rix
365e84301d Add an Arbitrary instance for Category. 2016-06-23 16:29:19 -04:00
joshvera
55746c8127 Add cases to Term.Arbitrary 2016-06-23 16:28:51 -04:00
Rob Rix
0dec4c2879 Add a header above the instances. 2016-06-23 16:25:49 -04:00
Rob Rix
b604ddd446 FlexibleContexts all the things. 2016-06-23 16:19:51 -04:00
Rob Rix
ae55c9480a Generalize nearestNeighbour. 2016-06-23 11:45:17 -04:00
Rob Rix
ed552da2af Swap the d/bag arguments in featureVector. 2016-06-23 10:34:23 -04:00
Rob Rix
6c8ee2958a Rename a to leaf. 2016-06-23 10:23:27 -04:00
Rob Rix
a657295ae6 Generalize pqGrams over a getLabel accessor again. 2016-06-23 10:18:39 -04:00
Rob Rix
c9b26f2da8 Category is Hashable. 2016-06-23 09:55:48 -04:00
Rob Rix
a58463007e Derive a Generic instance for Category. 2016-06-23 09:55:43 -04:00
Rob Rix
6133903e8c Extract the label from a record. 2016-06-23 09:52:15 -04:00
Rob Rix
9b8e9305e4 Shrink arbitrary records. 2016-06-23 09:46:44 -04:00
Rob Rix
656d8318ad Add an Arbitrary instance over Data.Record. 2016-06-23 09:45:41 -04:00
Rob Rix
4a8b7631bb Stub in a Data.Record.Arbitrary module. 2016-06-23 09:42:43 -04:00
Rob Rix
8d164480ee Extract the root stem assignment into a setRootStem function. 2016-06-23 09:39:08 -04:00
Rob Rix
2faf708435 Extract the root base assignment into a setRootBase function. 2016-06-23 09:37:43 -04:00
Rob Rix
167386fcfb Produce correct diffs in the general case. 2016-06-23 09:28:35 -04:00
Rob Rix
fc7dfe4f0f Diff all-inserted and all-deleted cases correctly. 2016-06-22 18:09:30 -04:00
Rob Rix
2d709e1fc7 Add RWS operations. 2016-06-22 18:09:11 -04:00
Rob Rix
7b3cb50165 Stub in an rws function. 2016-06-22 18:01:43 -04:00
Rob Rix
1170bfdcb2 Rename Data.Gram to Data.RandomWalkSimilarity. 2016-06-22 17:59:28 -04:00
Rob Rix
108decbcaa Reformatting. 2016-06-22 17:48:56 -04:00
Rob Rix
bc21d2f3b2 Find the nearest neighbour in the worst possible way. 2016-06-22 17:33:40 -04:00
Rob Rix
5684017e80 Extract magnitude to the top level. 2016-06-22 17:33:27 -04:00
Rob Rix
186c751d8d Set bases through key/value pairs. 2016-06-22 16:51:17 -04:00
Rob Rix
1273f1bce9 Assign sibling labels, padding out to q. 2016-06-22 16:46:56 -04:00
Rob Rix
4292d7d94e Provide each element to the windowed combining function. 2016-06-22 16:25:27 -04:00
Rob Rix
9877b71f96 Produce a single gram per child. 2016-06-22 16:24:54 -04:00
Rob Rix
f553cac094 Specialize pqGrams to Cofree of Syntax. 2016-06-22 16:17:54 -04:00
Rob Rix
5bdbf3eb7d 🔥 a type signature. 2016-06-22 16:09:59 -04:00
Rob Rix
ff5059dff1 Add a windowed fold operator. 2016-06-22 15:55:54 -04:00
Rob Rix
a5f1926b63 Tidying. 2016-06-22 15:21:54 -04:00
Rob Rix
f1d190326c Remove children from the unpacking function. 2016-06-22 15:18:37 -04:00
Rob Rix
dac5431c1b Fold instead of unpacking children. 2016-06-22 15:17:39 -04:00
Rob Rix
6e3c9ddd00 Flesh out stems from the root. 2016-06-22 15:15:44 -04:00
Rob Rix
6c36e80602 Try to define pqGrams as a hylomorphism. 2016-06-22 15:13:15 -04:00
Rob Rix
7ff1fb0021 Assign placeholder parents at the root. 2016-06-22 13:46:31 -04:00
Rob Rix
4d2af0684d Represent Gram labels in Maybe. 2016-06-22 11:52:50 -04:00
Rob Rix
dbcf4a2da0 Derive Eq & Show instances. 2016-06-22 11:01:52 -04:00
Rob Rix
e8428446e2 Shrink Grams. 2016-06-22 10:59:16 -04:00
Rob Rix
5bfd65b665 Use gramWithPQ for the Arbitrary instance. 2016-06-22 10:57:43 -04:00
Rob Rix
1d848e6dc3 Generate arbitrary p,q-grams. 2016-06-22 10:54:48 -04:00
Rob Rix
b85e2f27ce Add an Arbitrary instance over Grams. 2016-06-22 10:53:50 -04:00
Rob Rix
9a976869b2 Stub in a module for arbitrary grams. 2016-06-22 10:53:29 -04:00
Rob Rix
ae08777c52 Prepend p parent labels. 2016-06-22 10:21:37 -04:00
Rob Rix
fa760d7ae1 Assign parents. 2016-06-22 10:13:25 -04:00
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