1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00
Commit Graph

17650 Commits

Author SHA1 Message Date
Rob Rix
1eacd39c0c Reformat the Carrier signature a little more. 2018-10-29 11:19:31 -04:00
Rob Rix
148eb81d51 Diffing.Algorithm no longer exports Empty. 2018-10-29 11:01:52 -04:00
Rob Rix
65b7707f46 Define diffing as an effect. 2018-10-29 11:01:41 -04:00
Rob Rix
5bf4479597 🔥 a stray LambdaCase. 2018-10-29 10:26:56 -04:00
Rob Rix
f8001765e0 Fix a dodgy import. 2018-10-29 09:59:29 -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
1b507fc5c0 Inline runValueEffects into evaluate. 2018-10-26 13:38:20 -04:00
Rob Rix
2734b380fc Move graphingModuleInfo above eavesdrop. 2018-10-26 13:12:51 -04:00
Rob Rix
2fd8bcad92 🔥 some unused language extensions. 2018-10-26 13:11:20 -04:00
Rob Rix
66d5a1dfe8 Run nondeterminism locally in flow-sensitive analysis. 2018-10-26 13:03:14 -04:00
Rob Rix
f0925ad0cf 📝 evaluate. 2018-10-26 13:00:37 -04:00
Rob Rix
55df272a2a 📝 evalTerm. 2018-10-26 12:58:30 -04:00
Rob Rix
33f20e0cf5 📝 runValueEffects. 2018-10-26 12:56:13 -04:00
Rob Rix
141ed75d40 Don’t export ModuleC/ValueC. 2018-10-26 12:54:35 -04:00
Rob Rix
77675e1b80 Rename analyzeTerm to perTerm. 2018-10-26 12:52:30 -04:00
Rob Rix
b5ae015260 Inline the definition of evalModule into evaluate. 2018-10-26 12:51:59 -04:00
Rob Rix
485cbfdcfe Inline the definition of runInModule into evalModule. 2018-10-26 12:47:23 -04:00
Rob Rix
cb19a79fad Run python packaging. 2018-10-26 12:40:26 -04:00
Rob Rix
4aae4db57d Implement python packaging directly in the carrier. 2018-10-26 12:37:26 -04:00
Rob Rix
197ef61386 Rename the carrier to PythonPackagingC. 2018-10-26 12:30:49 -04:00
Rob Rix
37d4fea7b2 Simplify the carrier for runPythonPackaging. 2018-10-26 12:30:06 -04:00
Rob Rix
24660fca31 Rename runInTerm to runValueEffects. 2018-10-26 12:24:37 -04:00
Rob Rix
6cf82efb50 Factor runInTerm out of evalModule. 2018-10-26 11:39:47 -04:00
Rob Rix
cc09615b7b Inline the definition of evaluateModules into evaluate. 2018-10-26 10:27:05 -04:00
Rob Rix
bfb3b8a352 Rename the type parameters relating to the outer context. 2018-10-26 10:18:25 -04:00
Rob Rix
2b9d751aad Factor the prelude definition into runInTerm. 2018-10-26 10:17:19 -04:00
Rob Rix
915c7f5c61 🔥 the Eavesdrop effect. 2018-10-25 23:13:47 -04:00
Rob Rix
2a600ee28a Give a type signature for evalModule. 2018-10-25 23:10:37 -04:00
Rob Rix
3979ea4e86 🔥 disjunction. 2018-10-25 22:56:08 -04:00
Rob Rix
d4c6edb156 🔥 Disjunction. 2018-10-25 22:54:00 -04:00
Rob Rix
bc08525229 Don’t specialize disjunction. 2018-10-25 22:50:16 -04:00
Rob Rix
5c6801a272 Parameterize evaluate by a function running all the effects. 2018-10-25 22:23:47 -04:00
Rob Rix
52ed317fe6 Treat the prelude as a sort of a module. 2018-10-25 21:52:37 -04:00
Rob Rix
ce407d1c9e Move a bunch of the evaluation machinery to Semantic.Analysis. 2018-10-25 21:40:37 -04:00
Rob Rix
1414df368d Define a high-level Semantic.Analysis module. 2018-10-25 21:31:38 -04:00
Rob Rix
830fde2104 Simplify evaluate to take the term evaluator. 2018-10-25 21:22:22 -04:00
Rob Rix
428d92788b Sort a couple of constraints down. 2018-10-25 21:13:28 -04:00
Rob Rix
b738dcc12b Run effects in module analysis. 2018-10-25 21:03:51 -04:00
Rob Rix
64df59c4bf Extract evalTerm. 2018-10-25 20:55:07 -04:00
Rick Winfrey
9fc1a17ac6 Merge branch 'master' into add-explicit-assignment-timeout 2018-10-25 14:34:22 -07:00
Rob Rix
097af57735 Factor the interposes into a runInTerm helper. 2018-10-25 17:34:04 -04:00
Rob Rix
4cad9bc45e Re-export Control.Abstract.ScopeGraph from Control.Abstract. 2018-10-25 16:42:53 -04:00
Rob Rix
8a3d7ba927 Don’t be clever. 2018-10-25 13:48:47 -04:00
Rob Rix
c625efd9c5 Extract the fold over modules to the top level. 2018-10-25 13:47:07 -04:00
Rob Rix
df10f93bcd Extract runInModule to the top level. 2018-10-25 13:44:28 -04:00
Rob Rix
70a3a58034 Merge branch 'higher-order-effects' into decompose-evaluate 2018-10-25 13:32:43 -04:00
Rob Rix
b5aae138c5 🔥 a commented-out line. 2018-10-25 13:29:10 -04:00
Rob Rix
996a2ab79c 🔥 HasPostlude. 2018-10-25 11:49:50 -04:00
Rob Rix
91e747db8d 🔥 the HasPostlude constraints on SomeAnalysisParser. 2018-10-25 11:49:45 -04:00
Rob Rix
1e83574cf0 🔥 the use of postludes. 2018-10-25 11:47:21 -04:00
Rob Rix
4531c9afc7 🔥 Prologue’s re-export of MonadError. 2018-10-25 10:21:14 -04:00
Patrick Thomson
74005e5746 Make flag info and unit formatting like parse --quiet. 2018-10-25 09:40:38 -04:00
Rob Rix
775bc6ef80 Bump higher-order-effects for interposition. 2018-10-25 09:27:40 -04:00
Rob Rix
05c4f76663 🔥 redundant parens. 2018-10-24 15:41:14 -04:00
Rob Rix
49d7068f46 Define hmap with a LambdaCase. 2018-10-24 15:39:52 -04:00
Rob Rix
fc935058a5 Define handle with a LambdaCase. 2018-10-24 15:39:25 -04:00
Rob Rix
f2473d2807 handleCoercible. 2018-10-24 15:35:46 -04:00
Rob Rix
95d200426d 🔥 redundant parens. 2018-10-24 15:35:03 -04:00
Rob Rix
66466448ec Simplify the reinterpretation in ScopeEnvC. 2018-10-24 15:26:20 -04:00
Rob Rix
2d71e0b6fc Parameterize ScopeEnvC by the address type. 2018-10-24 15:23:59 -04:00
Rob Rix
cc97e57b01 Align the ScopeEnvC cases. 2018-10-24 15:21:07 -04:00
Rob Rix
b353f88ec5 Define the ScopeEnvC algebra with LambdaCase. 2018-10-24 15:20:09 -04:00
Rob Rix
277b7ad906 handleCoercible. 2018-10-24 15:16:50 -04:00
Rob Rix
676b5b5105 🔥 some redundant parens. 2018-10-24 15:16:30 -04:00
Rob Rix
d559aa1162 Use uncurry. 2018-10-24 15:09:34 -04:00
Rob Rix
8c4853eb9b Use LambdaCase for the Modules handler. 2018-10-24 15:08:58 -04:00
Rob Rix
254e20e831 Ignore a hint that doesn’t work. 2018-10-24 15:07:23 -04:00
Rob Rix
131cae4d7b Merge branch 'master' into higher-order-effects 2018-10-24 14:04:13 -04:00
Patrick Thomson
ab221477a4 extra import 2018-10-24 13:43:45 -04:00
Patrick Thomson
6f87624e35 Merge remote-tracking branch 'origin/master' into add-tsparse-quiet-flag 2018-10-24 13:37:16 -04:00
Patrick Thomson
ac33c7ac3a Add timing info and make output commensurate with parse --quiet. 2018-10-24 13:36:19 -04:00
Rob Rix
2216fcc44a Effect, not carrier.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
2018-10-24 12:40:17 -04:00
Rob Rix
41d206b9fa Eavesdrop in evaluate.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
2018-10-24 12:39:53 -04:00
Rob Rix
8edc379c31 Use Eavesdrop from the library.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
2018-10-24 12:39:45 -04:00
Patrick Thomson
e5b7965fcd Add a --quiet flag to the ts-parse command.
When parsing huge source files, I found myself wanting to time how
long the `ts-parse` command takes; however, the time spent printing
large ASTs means that such timings are inaccurate. The `tree-sitter`
CLI provides a `--quiet` flag for this purpose; I've copied it here.
2018-10-24 11:01:38 -04:00
Rob Rix
15a8917c84 Simplify the FunctionC carrier instances. 2018-10-24 11:00:54 -04:00
Rob Rix
25b2c3c4e9 Encapsulate the state effects inside EnvC. 2018-10-24 10:21:29 -04:00
Rob Rix
bff13c7272 Parameterize EnvC by the address type. 2018-10-24 10:14:04 -04:00
Rob Rix
9c390c57ee Prune empty branches. 2018-10-23 17:00:53 -04:00
Rob Rix
b858c1db2a Specialize the Traversable instance for B. 2018-10-23 16:51:04 -04:00
Rob Rix
1fccee5d67 Reorder the B constructors. 2018-10-23 16:49:18 -04:00
Rob Rix
81c18a860d Specialize null for B. 2018-10-23 16:48:56 -04:00
Rob Rix
1912fa20c1 Specialize toList for B. 2018-10-23 16:48:19 -04:00
Rob Rix
44f604bb0d Specialize the Foldable instance for B. 2018-10-23 16:48:10 -04:00
Rob Rix
03b76df474 Run nondeterminism to B, and then produce a list from that. 2018-10-23 16:47:52 -04:00
Rob Rix
2cb955e0dc Define a Monad instance for B. 2018-10-23 16:47:11 -04:00
Rob Rix
a7902aeb06 Define an Alternative instance for B. 2018-10-23 16:47:03 -04:00
Rob Rix
60f26ae160 Define an Applicative instance for B. 2018-10-23 16:46:20 -04:00
Rob Rix
448c6e03ec Define a binary tree datatype. 2018-10-23 16:46:06 -04:00
Rob Rix
88a116cedc 🔥 the demotes. 2018-10-23 15:50:42 -04:00
Rob Rix
a18410cb0b Promote ret from the underlying carrier. 2018-10-23 15:49:59 -04:00
Patrick Thomson
9e2ea1101d stray LANGUAGE pragma 2018-10-23 15:46:02 -04:00
Patrick Thomson
ef696d3c41 Split up Semantic.IO.
This looks like a big patch, but it's very straightforward: no
behavior has changed.

After the umpteenth time spent hitting a compile error because I
passed a `FilePath` rather than a `File` to `readBlobFromPath`, I
decided to finally make the needed refactors to Semantic.IO, and to
split off the `File` type and `Files` effect. This patch:

* adds the `MonadIO` class to `Prologue`'s export list
* moves `File` into `Data.File`
* moves `Handle` into `Data.Handle`
* moves `Files` into `Semantic.Task.Files`
* moves functions for reading blobs into `Data.Blob`
* keeps general IO helpers in Semantic.IO
* renames `readFile` to `readBlobFromFile`
* renames `readBlobFromPath` to `readBlobFromFile'`

This should have a positive effect on compile times and ease of
navigation throughout the codebase.
2018-10-23 15:37:49 -04:00
Rob Rix
94422728eb 🔥 a pointless case. 2018-10-23 15:23:01 -04:00
Rob Rix
40c51dfeb8 Export TaskEff again. 2018-10-23 15:05:45 -04:00
Rob Rix
f019efd845 modify is already strict. 2018-10-23 12:21:21 -04:00
Rob Rix
655b961f86 Correct the Trace handler. 2018-10-23 12:21:02 -04:00
Rob Rix
6d9f08f0d0 Raise the handlers. 2018-10-23 12:19:59 -04:00
Patrick Thomson
5dba69bd8f Change the defaults to 6 and 4. 2018-10-23 12:19:12 -04:00
Rob Rix
5ae699e902 Use runModuleTable. 2018-10-23 12:19:06 -04:00
Rob Rix
2664bca478 Add the continuations to the algebra. 2018-10-23 12:18:37 -04:00
Rob Rix
ad5789def5 Add a missing import. 2018-10-23 12:17:20 -04:00
Rob Rix
ada478517f Flip runREPLC. 2018-10-23 12:17:06 -04:00
Rob Rix
d80d72eb8e Fix the Effect instance for REPL. 2018-10-23 12:16:49 -04:00
Rob Rix
664910dc99 🔥 the extra parameter to Eff. 2018-10-23 12:16:18 -04:00
Rob Rix
3edd6c3f56 Enable UndecidableInstances. 2018-10-23 12:15:56 -04:00
Rob Rix
ed2e9f7c44 Drop the redundant parameters to evaluate. 2018-10-23 12:15:26 -04:00
Rob Rix
66188d7c7a Correct the method names. 2018-10-23 12:15:11 -04:00
Rob Rix
bf411cc8ea Define a REPL carrier. 2018-10-23 12:14:02 -04:00
Rob Rix
eee94e6aca handle, not handleState. 2018-10-23 12:09:03 -04:00
Rob Rix
546add053c Fix some imports. 2018-10-23 12:08:21 -04:00
Rob Rix
55888b1a5f Specialize evaluateProjectWithCaching to Monovariant addresses. 2018-10-23 12:07:24 -04:00
Rob Rix
8b945859f3 Raise the Eff handlers to Evaluator. 2018-10-23 12:04:45 -04:00
Rob Rix
670f65190c Raise some handlers. 2018-10-23 12:03:19 -04:00
Rob Rix
05f59347b2 Use runHeap for the heap effect. 2018-10-23 12:01:53 -04:00
Rob Rix
1dc9e997e3 🔥 the redundant parameter to runFresh. 2018-10-23 12:01:38 -04:00
Rob Rix
f545665403 Run the module table effect with the helper. 2018-10-23 12:00:40 -04:00
Rob Rix
80ab393d79 🔥 the redundant parameters to evaluate. 2018-10-23 11:57:37 -04:00
Rob Rix
2bee99d97e Run trace by printing. 2018-10-23 11:56:17 -04:00
Rob Rix
422d1a6db0 🔥 some redundant Monad constraints. 2018-10-23 11:54:34 -04:00
Rob Rix
9bae2bfcb2 Add a missing Effect constraint. 2018-10-23 11:54:19 -04:00
Rob Rix
e2c64f336a Run in Eff. 2018-10-23 11:52:45 -04:00
Rob Rix
5b2f070558 Raise some handlers. 2018-10-23 11:51:51 -04:00
Rob Rix
7ac4b5dbcb 🔥 the call to runPythonPackaging for the moment. 2018-10-23 11:51:20 -04:00
Rob Rix
82956152c6 Re-add the WhileC Carrier instance for the concrete domain. 2018-10-23 11:41:16 -04:00
Patrick Thomson
95ffd19e6e otiose import 2018-10-23 11:39:19 -04:00
Rob Rix
c4aaa86230 Generalize disjunction over the carrier. 2018-10-23 11:39:09 -04:00
Rob Rix
c53a6aa511 Interpose with an upcast. 2018-10-23 11:30:58 -04:00
Patrick Thomson
be9ffa49d3 Remove inaccurate TODO. 2018-10-23 11:25:55 -04:00
Patrick Thomson
d8a7b2edfb Add TREE_SITTER_ASSIGNMENT_TIMEOUT environment variable.
Now that #2223 is fixed, we're encountering certain large files,
such as[this](https://github.com/golang/text/blob/master/collate/tables.go),
that parse in an acceptable window but that take a tremendously long
time to assign. As such, it behooves us to provide a mechanism to
specify assignment timeouts, independent of the tree-sitter parse timeout.

I copied the Dockerfile/default values from those specified for
TREE_SITTER_PARSE_TIMEOUT. I am open to suggestions as to different
values.

ccing @tclem on this to make sure I haven't screwed anything up w/r/t Docker.
2018-10-23 11:21:34 -04:00
Rob Rix
92ac53252e Define upcasting to InterposeC. 2018-10-23 09:45:33 -04:00
Rob Rix
edbf882fa9 Raise the graph state handler. 2018-10-23 09:43:57 -04:00
Rob Rix
bc094e6014 Add some Effect constraints. 2018-10-23 09:43:26 -04:00
Rob Rix
ee17c526e6 Specify the value type. 2018-10-23 09:41:46 -04:00
Rob Rix
6697e2f9e5 runEvaluator produces Eff. 2018-10-23 09:41:36 -04:00
Rob Rix
0a337d5a25 Eavesdrop without changing the type of analyzeModule. 2018-10-23 09:31:43 -04:00
Rob Rix
f4faaed464 Define upcasting on Eff. 2018-10-23 09:31:11 -04:00
Rob Rix
21f17ff56f Clean up a bunch of algebras. 2018-10-22 20:30:07 -04:00
Rob Rix
314aff5d56 Bump higher-order-effects for Resource & some handler helpers. 2018-10-22 20:18:36 -04:00
Rob Rix
11ccb849a6 Fix a dodgy import. 2018-10-22 20:18:16 -04:00
Rob Rix
08c95f894d Simplify the eavesdropping carriers. 2018-10-22 13:06:59 -04:00
Rob Rix
bfe5406fad Fix up some type applications. 2018-10-22 13:00:57 -04:00
Rob Rix
119cdad2d2 Raise a bunch of handlers. 2018-10-22 12:58:06 -04:00
Rob Rix
5ea78e922e Simplify the Modules carrier. 2018-10-22 12:57:58 -04:00
Rob Rix
60b27e84f5 Simplify the collecting carriers. 2018-10-22 12:57:51 -04:00
Rob Rix
4338e5b5b9 Simplify the flow-sensitive carriers. 2018-10-22 12:57:46 -04:00
Rob Rix
9021472361 Simplify the flow-insensitive carriers. 2018-10-22 12:57:39 -04:00
Rob Rix
56eae42043 Simplify the While carriers. 2018-10-22 12:49:01 -04:00
Rob Rix
ee077944ca Generalize the Abstract.Boolean smart constructors. 2018-10-22 12:45:36 -04:00
Rob Rix
9b3fb906ae Simplify the BooleanC carriers. 2018-10-22 12:38:43 -04:00