1
1
mirror of https://github.com/github/semantic.git synced 2024-12-15 10:02:27 +03:00
Commit Graph

536 Commits

Author SHA1 Message Date
Rob Rix
13eb824552 Bump fused-effects. 2018-10-29 13:31:24 -04:00
Rob Rix
4abfd4197b Bump fused-effects for https://github.com/robrix/fused-effects/pull/52. 2018-10-29 11:57:26 -04:00
Rob Rix
636eec364e Update to fused-effects, replace \/ with handleSum and bundle Interpose. 2018-10-29 09:52:48 -04:00
Rob Rix
637b9ee41e 🔥 effects. 2018-10-25 11:05:27 -04:00
Rob Rix
775bc6ef80 Bump higher-order-effects for interposition. 2018-10-25 09:27:40 -04:00
Rob Rix
131cae4d7b Merge branch 'master' into higher-order-effects 2018-10-24 14:04:13 -04:00
Rob Rix
c03b7ecabd Bump higher-order-effects for Eavesdrop.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
2018-10-24 12:39:24 -04:00
Rob Rix
314aff5d56 Bump higher-order-effects for Resource & some handler helpers. 2018-10-22 20:18:36 -04:00
Patrick Thomson
54fb762cf1 Bump tree-sitter-ruby.
The bumped version of tree-sitter-ruby did not make it into #2223 due
to an error on my part. This halves the time it takes to parse the
pathological lexer.rb file.
2018-10-22 13:55:52 -04:00
Rob Rix
034e2469ff Bump higher-order-effects. 2018-10-22 10:26:15 -04:00
Rob Rix
3ef2efa73a Merge branch 'master' into higher-order-effects 2018-10-22 09:45:57 -04:00
Patrick Thomson
71e8991b6e pull in new tree-sitter 2018-10-21 17:25:09 -04:00
Patrick Thomson
d0c8fdf935 Fix massive slowdown when copying large AST nodes.
As per https://github.com/tree-sitter/haskell-tree-sitter/pull/67, we
weren't using the right tree-sitter APIs to copy node children into a
Haskell-compatible data structure. This bumps tree-sitter-haskell and
adjusts the change in signature of ts_node_copy_child_nodes.
2018-10-21 15:19:38 -04:00
Patrick Thomson
ac543651ee Add NFData instances to enable more accurate benchmarking.
Because we're getting serious about benchmarking in the run-up to
Windrose, it's time to bring in the `deepseq` package to ensure that
benchmarks can fully evaluate the result of a test case.

The `deepseq` package provides an `NFData` typeclass:

```
class NFData a where
  rnf :: a -> ()
```

Instances use the `seq` combinator to ensure that the argument to
`rnf` is fully evaluated, returning (). If there is a `Generic`
instance for `a`, the implementation can be omitted. This patch adds
NFData for every syntax node, graph vertex, environment data
structures, and exceptions. It is long, but the work is very
straightforward, so don't panick.

The benchmark suite (`stack bench`) now produces more accurate
results. The benchmarks previously mimicked `rnf` by calling `show` on
the result of an evaluation or graph construction; now that we have
actual `NFData` instances we can use the `nfIO` combinator from
criterion. This has sped up the evaluation benchmarks and reduced
their memory consumption, while it has slowed down the call graph
benchmarks, as those benchmarks weren't evaluating the whole of the
graph.

Unfortunately, this patch increases compile times, as we have to
derive a few more Generic instances. I wish this weren't the case, but
there's little we can do about it now. In the future I have some plans
for how to reduce compile time, and I bet that those gains will at
least nullify the speed hit from this patch.

Now that we have NFData instances for every data type, we can start
benchmarking assignments, in preparation for fixing #2205.

This patch also pulls in updates to `effects` and `fastsum` that add
appropriate NFData instances for the data they vend.
2018-10-17 14:08:47 -04:00
Patrick Thomson
d56badfb29 Use upstream Resource effect. 2018-10-16 20:11:38 -04:00
Patrick Thomson
75bf696e47 Fix crash/race associated with bracket (#2207)
The bracket that I wrote inside effects does not properly handle
asynchronous exceptions, as it has no way to call the mask function.
As such, because the asynchronous exception is rethrown by both
`bracket` and `wait`, the exception handler will trigger twice. This
is what is causing the crash: `bracket` is passing the TSParser we
create in parseToAST to ts_parser_delete twice.

The best thing to do here is to create the new `Resource` effect,
which is interpreted down to `Control.Exception.bracket`, which has
the correct asynchronous-masking behavior, unlike the `bracket` in
`Control.Monad.Effect.Exception`, which I propose to remove in a patch
to `effects`.

This also bumps haskell-tree-sitter so that the
`ts_node_copy_child_nodes` function is considered `interruptible`.

To test:

1. Download [this file](https://gist.ghe.io/tclem/c2ffe3d20b248fdac59588aa98f168ae)
2. Run `TREE_SITTER_PARSE_TIMEOUT=1000 stack exec semantic -- --log-level=debug parse lexer.rb`

Before applying this patch, you will see a crash associated with a
double-free; afterwards, it should time out normally.
2018-10-16 17:05:29 -04:00
Rob Rix
800c459bb0 Bump higher-order-effects for catchIO/bracket. 2018-10-14 22:16:07 -04:00
Rob Rix
56dabab68f Bump higher-order-effects for hmap. 2018-10-12 14:46:00 -04:00
Rob Rix
0db8091c5e Bump higher-order-effects. 2018-10-12 14:22:50 -04:00
Rob Rix
6fb6fd3d4e Add higher-order-effects. 2018-10-12 12:37:08 -04:00
Timothy Clem
953b095161 ++tree-sitter 2018-09-19 12:03:39 -07:00
Patrick Thomson
22cf72c20f Merge branch 'master' into term-rewriting-mk2 2018-09-19 11:51:28 -04:00
Timothy Clem
253975164a Test out JavaScript parse-examples 2018-09-18 15:32:56 -07:00
Patrick Thomson
6e65f9060d Merge remote-tracking branch 'origin/master' into term-rewriting-mk2 2018-09-18 13:31:58 -04:00
Timothy Clem
30b57cfd67 ++tree-sitter 2018-09-18 09:57:34 -07:00
Timothy Clem
12e1fe3a88 ++tree-sitter 2018-09-18 09:07:26 -07:00
Timothy Clem
b6e257c088 Pick up tree-sitter-go-bump 2018-09-17 11:22:12 -07:00
Timothy Clem
d38b0998a0 ++tree-sitter with a few language grammar updates too 2018-09-17 09:29:27 -07:00
Patrick Thomson
b8b8fe01c9 port over Control.Rewriting 2018-09-14 12:47:21 -04:00
Rob Rix
99a19e6e17 Bump effects for more accurate error context.
This brings in https://github.com/joshvera/effects/pull/65, avoiding a bug where local changes would be applied outside the local scope.
2018-08-23 13:37:56 -04:00
Rick Winfrey
0d19b46880 Bump haskell-tree-sitter 2018-08-09 15:45:45 -07:00
Josh Vera
7b025c6e49 Merge branch 'master' into bump-tree-sitter 2018-07-23 19:55:21 -04:00
Timothy Clem
2a5847edee ++haskell-tree-sitter, tree-sitter, languages 2018-07-23 14:25:45 -07:00
Josh Vera
92f635ba0a Merge branch 'master' into bump-effects-for-pure-effect 2018-07-23 17:02:24 -04:00
Ayman Nadeem
52d89b7a05 fix merge conflicts 2018-07-23 11:23:57 -04:00
Rob Rix
182c539718 Bump effects for a generalization to bracket. 2018-07-23 11:02:19 -04:00
Rob Rix
d1a9775874 Bump effects. 2018-07-23 10:55:07 -04:00
joshvera
c9c7e43078 ++haskell-tree-sitter 2018-07-20 14:52:27 -04:00
Timothy Clem
45bee052ab ++haskell-tree-sitter with tree-sitter-java 2018-07-18 08:48:33 -07:00
Timothy Clem
3c0e4c7d3d Back to master's vendor/effects 2018-07-18 08:44:18 -07:00
Ayman Nadeem
3272e49d97 bump haskell-tree-sitter 2018-07-16 17:23:37 -04:00
Ayman Nadeem
7fec77cc30 add dimsExpr and arrayCreationExpression assignments and syntaxes 2018-07-13 16:21:34 -04:00
Rob Rix
c622ba6cbf Bump effects to master. 2018-07-13 11:02:39 -04:00
Rob Rix
992cb0a404 Bump effects. 2018-07-13 08:54:59 -04:00
Rob Rix
f31657f7b9 Revert "++effects"
This reverts commit 41ac951037a2e75c2fd4d5fce7a38ecb8fe1976e.
2018-07-13 08:54:21 -04:00
Rob Rix
243080f2fd Revert "Bump effects."
This reverts commit 7ca00be818896e6353b987965f49405322a9dfed.
2018-07-13 08:53:52 -04:00
Rob Rix
0107d38a8f Revert "Bump."
This reverts commit dd9ea0edb668ba87c93a8c8ea12ffe721d14d6ed.
2018-07-13 08:53:44 -04:00
Rob Rix
e1cb98c178 Bump. 2018-07-12 13:53:12 -04:00
Rob Rix
0508ab8122 Bump effects. 2018-07-12 13:39:21 -04:00
joshvera
25471daee6 ++effects 2018-07-11 15:38:46 -04:00