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

25899 Commits

Author SHA1 Message Date
Rob Rix
02b92a5962 Simplify the carrier for Allocator. 2018-10-22 11:14:40 -04:00
Rob Rix
77ca843a52 Simplify the carriers for LoopControl & Return. 2018-10-22 11:03:09 -04:00
Rob Rix
034e2469ff Bump higher-order-effects. 2018-10-22 10:26:15 -04:00
Rob Rix
a7f59e55bc SomeError, not SomeExc. 2018-10-22 09:53:59 -04:00
Rob Rix
2d2b3421db Error, not Exc. 2018-10-22 09:48:10 -04:00
Rob Rix
3ef2efa73a Merge branch 'master' into higher-order-effects 2018-10-22 09:45:57 -04:00
Patrick Thomson
3ae2ddf7be Merge pull request #2215 from github/avoid-recompiling-git
Prevent unnecessary recompilation of Semantic.Version in dev mode.
2018-10-19 17:05:22 -04:00
Rob Rix
64a4a65152 Comment out the concrete WhileC Carrier instance. 2018-10-19 14:46:36 -04:00
Rob Rix
1bb04f5446 Interpose in the runPythonPackaging mechanism. 2018-10-19 14:46:18 -04:00
Rob Rix
45f9d1a19e Extract the Effs in some key places. 2018-10-19 14:45:56 -04:00
Rob Rix
29e29f80bd Add a missing Effect constraint. 2018-10-19 14:45:39 -04:00
Rob Rix
c2450c67b0 Add some missing Monad constraints. 2018-10-19 14:45:31 -04:00
Rob Rix
5b4099bb0a Define a runModuleTable helper. 2018-10-19 14:45:12 -04:00
Rob Rix
d7e4451d20 We no longer pass in the address or value effect handlers. 2018-10-19 14:44:52 -04:00
Rob Rix
8a5cfbd250 Reformat the Modules handler. 2018-10-19 14:43:52 -04:00
Rob Rix
101a550380 These aren’t exported from here any more. 2018-10-19 14:43:44 -04:00
Patrick Thomson
1d7f4aba2c Merge branch 'master' into avoid-recompiling-git 2018-10-19 12:57:08 -04:00
Patrick Thomson
a0484ed20d Merge pull request #2220 from github/fail-on-parse-error
Add a flag to fail fast on tree-sitter parse errors
2018-10-19 12:53:08 -04:00
Timothy Clem
4d1f079855 Add a flag to fail fast on tree-sitter parse errors 2018-10-18 15:23:43 -07:00
Patrick Thomson
7c8e8c5bf5 Merge remote-tracking branch 'origin/master' into avoid-recompiling-git 2018-10-18 17:22:18 -04:00
Patrick Thomson
99af3a1799 Fix inaccuracy in comments. 2018-10-18 17:12:49 -04:00
Patrick Thomson
2ea6747370 Merge pull request #2217 from github/ghc-rtsopts
[Experiment] Improve compile speed with larger GHC allocation area
2018-10-18 17:09:55 -04:00
Patrick Thomson
b9d4201ddb Merge branch 'master' into ghc-rtsopts 2018-10-18 13:05:37 -04:00
Josh Vera
efde121720 Merge branch 'master' into avoid-recompiling-git 2018-10-18 11:28:18 -04:00
Josh Vera
f458fe580c Merge pull request #2206 from github/quiet-parsing
New cli switch for quiet parsing with timing stats
2018-10-18 11:27:11 -04:00
Josh Vera
b5714f28c4 Merge branch 'master' into quiet-parsing 2018-10-18 10:55:45 -04:00
Rob Rix
b861e504ea We don’t need scoped type variables here any more. 2018-10-18 10:54:46 -04:00
Rob Rix
3b0c59eea5 Change the type to account for the eavesdropping. 2018-10-18 10:53:52 -04:00
Rob Rix
66fc361467 Account for SomeError instead of SomeExc. 2018-10-18 10:53:32 -04:00
Rob Rix
a2264fd16e Handle a bunch of resumable effects. 2018-10-18 10:53:23 -04:00
Rob Rix
78c037f4a6 Allow the interpose. 2018-10-18 08:28:31 -04:00
Rob Rix
6391f14de5 Run the continuation after the while loop. 2018-10-18 08:28:21 -04:00
Rob Rix
f22972904e Use a lambda case for the loop operator. 2018-10-18 08:22:26 -04:00
Rob Rix
b3d85f8832 Define an interpose effect. 2018-10-18 08:21:05 -04:00
Rob Rix
8e868cc886 Define an eavesdrop effect. 2018-10-18 08:20:58 -04:00
Rob Rix
b541a973a4 appendGraph requires a Monad. 2018-10-18 08:20:36 -04:00
Patrick Thomson
f4b5f0d44e [Experiment] Improve compile speed with larger GHC allocation area 2018-10-17 21:27:22 -04:00
Patrick Thomson
26da3d463a Merge pull request #2216 from github/split-up-haskell-syntax
Split up Language.Haskell.Syntax into child modules.
2018-10-17 21:27:03 -04:00
Patrick Thomson
379d75f284 Split up Language.Haskell.Syntax into child modules.
This was the longest (in terms of line count) file in the project.
Splitting it up will save on compile time, as it did for TypeScript.
I observe a ~20sec speedup from `stack clean semantic && stack build semantic:lib`
2018-10-17 18:57:29 -04:00
Patrick Thomson
bcc084f5ac move the TH import inside the ifdef 2018-10-17 17:38:35 -04:00
Patrick Thomson
b361c9ef79 Prevent unnecessary recompilation of Semantic.Version in dev mode.
Right now, Semantic.Version is recompiled on every invocation of
`stack build`, since we marked it as `-fforce-recomp` to ensure that
all deployments are tagged appropriately for haystack. However, this
entails a good deal of wasted time during development. With some
liberal application of `CPP`, we can make this recompilation only
happen on CI, thanks to the `release` flag and passing in a compiler
flag.

To test:

* apply the patch
* `stack build semantic`, then `stack exec semantic -- -v`. It should
  print `semantic version 0.4.0 (<development>)`.
* `stack clean semantic && stack build --ghc-options=-DCOMPUTE_GIT_SHA`.
  `stack exec semantic -- -v` should then print out the correct SHA.

Though it's probably not strictly necessary, I've marked the
`semantic` and `semanticd` executables to compile with
-DCOMPUTE_GIT_SHA, just in case.
2018-10-17 17:24:14 -04:00
Patrick Thomson
42bb569ba9 Merge pull request #2214 from github/nfdata-instances
Add NFData instances to enable more accurate benchmarking.
2018-10-17 16:43:12 -04:00
Patrick Thomson
f911b43b63 fix lints 2018-10-17 14:38:30 -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
Timothy Clem
a19d8bd02e Revert removal of wait 2018-10-17 10:03:46 -07:00
Ayman Nadeem
1dce4b089b Merge branch 'quiet-parsing' of https://github.com/github/semantic into quiet-parsing 2018-10-17 12:12:23 -04:00
Ayman Nadeem
97b6c48c95 remove results 2018-10-17 12:12:12 -04:00
Timothy Clem
3b0a19238f Merge branch 'quiet-parsing' of github.com:github/semantic into quiet-parsing 2018-10-17 08:37:21 -07:00
Timothy Clem
070c15a947 Merge remote-tracking branch 'origin/master' into quiet-parsing 2018-10-17 08:18:33 -07:00
Patrick Thomson
abce41c1e1 Merge pull request #2211 from github/bracket-effect
Fix crash/race associated with `bracket` (#2207)
2018-10-16 23:34:04 -04:00