1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
Commit Graph

1078 Commits

Author SHA1 Message Date
Rob Rix
aed17adfed Remove the unflattened implementation. 2015-11-12 18:01:23 -05:00
Rob Rix
561045ced4 Flatten out equality over Cofree. 2015-11-12 18:01:12 -05:00
Rob Rix
e7b1f59658 Switch through the term directly. 2015-11-12 17:46:18 -05:00
Rob Rix
822ce7ccc5 Add a Cofree.size function.
This should avoid the protocol indirection around `TermType`.
2015-11-12 17:44:35 -05:00
Rob Rix
8cf0ef097c Patch.sum/difference are not allowed to throw. 2015-11-12 17:43:32 -05:00
Rob Rix
3f81b9d8b9 Inline size computations on Patch. 2015-11-12 17:35:34 -05:00
Rob Rix
7da058ca55 Manually fuse TermType.size. 2015-11-12 17:27:07 -05:00
Rob Rix
ab615dc84e Manually fuse the map and catamorphism in Free.sum. 2015-11-12 17:09:19 -05:00
Rob Rix
b0054aee54 Remove Free.reduce. 2015-11-12 17:00:05 -05:00
Rob Rix
77e9778f91 Remove the unused Interpreter.cost static function. 2015-11-12 16:59:56 -05:00
Rob Rix
f2004a22b8 Inline reduction in Free.sum. 2015-11-12 16:55:11 -05:00
Rob Rix
b276045348 Remove cons. 2015-11-12 16:13:31 -05:00
Rob Rix
82a8f095cf Inline calls to cons. 2015-11-12 16:13:23 -05:00
Rob Rix
4a356a8a0a Remove costOfStream. 2015-11-12 16:10:23 -05:00
Rob Rix
b8fb48d723 Remove min. 2015-11-12 16:10:19 -05:00
Rob Rix
dac24bbf24 µ-optimizations for SES.
1. Avoid redundant computations of cost on the fast path (equal
elements at this vertex).

2. Don’t call `min`; inline the branches instead.

3. Don’t call `costOfStream`; inline the costs instead.
2015-11-12 16:09:53 -05:00
Rob Rix
5253de2ef5 Inline stream costs. 2015-11-12 15:58:14 -05:00
Rob Rix
17b9c0a9ec Fast fail on out of bounds diagonals. 2015-11-12 15:58:03 -05:00
Rob Rix
e1f38f64d0 Precompute the width of the matrix. 2015-11-12 15:26:50 -05:00
Rob Rix
dd812a2b2b Test that we aren’t at the endIndex instead of testing containment.
This should be O(1) for all index types.
2015-11-12 15:20:51 -05:00
joshvera
b1241decda use the right --> overload 2015-11-10 14:11:09 -05:00
joshvera
f77b899377 Merge branch 'master' into line-numbers 2015-11-09 12:06:48 -05:00
joshvera
576457a3fe take a before and after line number range 2015-11-08 15:21:14 -05:00
Rob Rix
b3ace6c533 Free is a monad. 2015-11-05 17:18:03 -05:00
Rob Rix
7d5c3bf70c Eh don’t provide the index after all. 2015-11-05 17:00:39 -05:00
Rob Rix
51496ab173 Pass the indices along to recur. 2015-11-05 16:22:02 -05:00
Rob Rix
84ed21b1a2 Generalize SES to arbitrary CollectionType. 2015-11-05 16:14:10 -05:00
Rob Rix
ee285d79dd Don’t transpose the coordinate system. 2015-11-05 16:12:53 -05:00
Rob Rix
f4a8bcdc90 Correct the Matrix sizing. 2015-11-05 16:04:39 -05:00
Rob Rix
c0002c47e6 Use successors rather than integer addition. 2015-11-05 15:52:38 -05:00
Rob Rix
6a0068362e Subscript with the correct indices. 2015-11-05 15:51:50 -05:00
Rob Rix
217a2c5a50 Define Matrix over two ranges. 2015-11-05 15:51:15 -05:00
Rob Rix
fdfdeb0dbf SES operates over a pair of ranges. 2015-11-05 15:46:36 -05:00
Rob Rix
fc76ce05eb Matrix can be constructed with a pair of ranges. 2015-11-05 15:45:30 -05:00
Rob Rix
38686fee20 constructRowMajor operates over a pair of ranges. 2015-11-05 15:45:19 -05:00
Rob Rix
3f5812bef5 Explicitly convert the bounds to Int. 2015-11-05 15:40:33 -05:00
Rob Rix
91f67a41b7 Document right. 2015-11-05 12:10:42 -05:00
Rob Rix
e8c5462de1 Document left. 2015-11-05 12:10:17 -05:00
Rob Rix
9c8131e7a2 Document outOf. 2015-11-05 12:09:28 -05:00
Rob Rix
e67f0d6569 Document into. 2015-11-05 12:08:46 -05:00
Rob Rix
f4fff72814 Rename all the up labels. 2015-11-05 12:07:59 -05:00
Rob Rix
3b82364065 Rename the private var. 2015-11-05 12:06:54 -05:00
Rob Rix
ba450bf45a Rename up to outOf. 2015-11-05 12:06:39 -05:00
Rob Rix
825eaa5ac3 Rename the constructor label. 2015-11-05 12:06:04 -05:00
Rob Rix
c8576dcb88 Rename the private _down var too. 2015-11-05 12:05:43 -05:00
Rob Rix
9151d02655 Rename down to into. 2015-11-05 12:05:28 -05:00
Rob Rix
336c2b87b2 Pass updates to keyed collections along correctly. 2015-11-05 11:45:53 -05:00
Rob Rix
917a49c520 Pass updates to collections along correctly. 2015-11-05 11:45:46 -05:00
Rob Rix
59e02988f0 Remove the obsolete unary/binary/ternary constructors. 2015-11-05 11:42:55 -05:00
Rob Rix
65c86a94d8 Use the variadic constructor for the fixed conveniences. 2015-11-05 11:42:33 -05:00