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

1362 Commits

Author SHA1 Message Date
Rob Rix
a1c5d96a93 Rephrase resume without the continuation. 2018-05-06 15:37:11 -04:00
Rob Rix
bfd95c29f8 Allow evaluating to occur in non-final positions. 2018-05-06 15:14:57 -04:00
Rob Rix
32bdafe20e 🔥 EvaluatingEffects. 2018-05-06 15:12:55 -04:00
Rob Rix
7d4db61f26 Add a handler for Fresh effects. 2018-05-06 14:57:03 -04:00
Rob Rix
fbfa61d2fc Add a helper to run an Effectful computation with no effects. 2018-05-06 14:47:06 -04:00
Rob Rix
3ad0b357c5 🔥 redundant constraints. 2018-05-06 14:44:46 -04:00
Rob Rix
6e54b67c1f Rename handleState to runState. 2018-05-06 14:28:19 -04:00
Rob Rix
2b5e62dc33 Rename handleReader to runReader. 2018-05-06 14:26:01 -04:00
Rob Rix
848543010d Handle LoopControl local to Evaluatable. 2018-05-06 14:12:41 -04:00
Rob Rix
5ab5e37c22 Continue with a value. 2018-05-06 14:05:50 -04:00
Rob Rix
bd997d8564 Handle Return locally to evalTerm. 2018-05-06 13:50:58 -04:00
Rob Rix
93e9f11491 Move the LoadStack effect into Evaluatable. 2018-05-06 13:36:49 -04:00
Rob Rix
4c5734452a 🔥 the termInfo parameter from Located. 2018-05-06 13:29:05 -04:00
Rob Rix
30b8002394 🔥 Origin altogether. 2018-05-06 13:25:28 -04:00
Rob Rix
89efff7346 Represent Origin as an even simpler triple. 2018-05-06 13:15:55 -04:00
Rob Rix
a1c9822a87 Represent Origin as a simple triple. 2018-05-06 13:07:40 -04:00
Rob Rix
c0b9a812a1 SomeOrigin doesn’t do anything fancy with the term type. 2018-05-06 12:37:30 -04:00
Rob Rix
88f64e7301 Specialize evaluating. 2018-05-06 12:08:09 -04:00
Rob Rix
3a2ba0b631 Generalize resumingBadModuleResolutions. 2018-05-06 12:04:29 -04:00
Rob Rix
b4185865c2 ResolutionError doesn’t need its value parameter. 2018-05-06 10:42:30 -04:00
Rob Rix
4529ee89e9 Don’t require callers to provide the module & term explicitly. 2018-05-06 09:13:46 -04:00
Rob Rix
d31dce7490 Provide empty cells with a Lower constraint. 2018-05-04 19:40:53 -04:00
Rob Rix
1e173c4f2c Use ScopedTypeVariables to allow type applications against erroring. 2018-05-04 19:38:14 -04:00
Rob Rix
f83b002e78 Export EvaluatingEffects. 2018-05-04 19:38:01 -04:00
Rob Rix
b5485e8ab8 Rephrase Caching as cachingTerms, convergingModules, and caching handlers. 2018-05-04 19:24:07 -04:00
Rob Rix
a3c04da9fe Clean up the Tracing module. 2018-05-04 19:13:23 -04:00
Rob Rix
cdb8f26de4 Rephrase Tracing as tracingTerms & tracing handlers. 2018-05-04 19:12:51 -04:00
Rob Rix
04fb5d36b1 Fix up some language extensions &c. 2018-05-04 19:10:01 -04:00
Rob Rix
4c83723fbe Correct the name of the location type parameter. 2018-05-04 19:06:04 -04:00
Rob Rix
88ec9d7230 Rephrase Dead as revivingTerms, killingModules, and providingDeadSet handlers. 2018-05-04 19:01:01 -04:00
Rob Rix
cdb7169ecb Derive a Lower instance for Dead. 2018-05-04 18:55:21 -04:00
Rob Rix
7d97d97cc4 Rephrase Collecting & Retaining as collectingTerms & providingLiveSet handlers. 2018-05-04 18:50:48 -04:00
Rob Rix
9af39cad2f Rephrase TypeChecking as a simple handler. 2018-05-04 18:43:45 -04:00
Rob Rix
9cd92dd310 Rephrase ImportGraphing as graphingTerms, graphingModules, and importGraphing handlers. 2018-05-04 18:40:22 -04:00
Rob Rix
8a8bfc05a3 Rephrase BadVariables as a resumingBadVariables handler. 2018-05-04 18:40:07 -04:00
Rob Rix
b5c2cd6282 Rephrase BadValues as a resumingBadValues handler. 2018-05-04 18:39:54 -04:00
Rob Rix
fefe5bf671 Rephrase BadSyntax as a resumingBadSyntax handler. 2018-05-04 18:39:41 -04:00
Rob Rix
3fba25f491 Rephrase BadModuleResolutions as a resumingBadModuleResolutions handler. 2018-05-04 18:39:30 -04:00
Rob Rix
c16263ee28 Rephrase BadAddresses as a resumingBadAddresses handler. 2018-05-04 18:39:14 -04:00
Rob Rix
c7462b2de3 Rephrase Evaluating as providingCurrentTerm, providingCurrentModule, and evaluating handlers. 2018-05-04 18:38:59 -04:00
Rob Rix
6972847818 Rephrase erroring as a simple handler. 2018-05-04 18:37:56 -04:00
Rob Rix
40af10cf39 Dedent some comments. 2018-05-04 12:31:06 -04:00
Rob Rix
0a6decad08 Make BadAddresses consistent with the other analyses. 2018-05-04 11:55:33 -04:00
Rob Rix
b55e7aa2c2 Make BadValues consistent with the other analyses. 2018-05-04 11:54:51 -04:00
Rob Rix
0d9002b6d7 Make BadModuleResolutions consistent with the other analyses. 2018-05-04 11:54:32 -04:00
Rob Rix
4108302aed Split MonadAnalysis into AnalyzeModule & AnalyzeTerm classes. 2018-05-04 11:19:36 -04:00
Rob Rix
e283ae0e37 Generalize the Caching functionality. 2018-05-02 19:27:20 -04:00
Rob Rix
083712864a Generalize a bunch of the import graph functions. 2018-05-02 19:26:25 -04:00
Rob Rix
64132b12a3 Redefine MonadEvaluator as a constraint synonym. 2018-05-02 19:25:57 -04:00
Rob Rix
d073020526 Clean up Evaluating’s imports & use the JumpTable synonym. 2018-05-02 18:45:07 -04:00
Rob Rix
63f4544496 Generalize scatter. 2018-05-02 18:42:58 -04:00
Rob Rix
8ca1a5112a Use raiseHandler when gathering nondeterminism. 2018-05-02 18:42:35 -04:00
Rob Rix
5d0fce0e6d Generalize a bunch of Interpreter instances. 2018-05-02 18:38:03 -04:00
Rob Rix
2ee3951af6 Export a bunch of types from Evaluator. 2018-05-02 18:29:40 -04:00
Rob Rix
d281a3f7e6 Make Evaluator a superclass of MonadEvaluator. 2018-05-02 17:51:54 -04:00
Rob Rix
911111987a Return to piecemeal state effects, and combine them in Evaluating. 2018-05-02 15:54:11 -04:00
Rob Rix
ccba15905d Modify the load stack locally. 2018-05-02 15:40:23 -04:00
Rob Rix
afdacec83f Add a helper to ask for the current SomeOrigin. 2018-05-02 14:59:59 -04:00
Rob Rix
baa3f41b39 Provide EvalModule in the body of evalModule. 2018-05-02 12:33:22 -04:00
Rob Rix
44c250bcf3 Use type applications instead of proxies when calling apply. 2018-05-02 12:13:01 -04:00
Rob Rix
ebc8e01cc4 Use our own local definition of Sum. 2018-05-02 12:00:15 -04:00
joshvera
19f0672f34 Separate import graphs into call graph and import graph analyses 2018-05-01 18:10:25 -04:00
joshvera
1f2e234549 Add CallGraph 2018-05-01 17:51:24 -04:00
Rob Rix
09fb3921b6 🔥 a redundant constraint. 2018-05-01 15:23:31 -04:00
Rob Rix
1400626b28 Provide the unevaluated module table in evaluatePackageBody. 2018-05-01 15:13:45 -04:00
Rob Rix
cc72724565 Note a TODO for the traceMs. 2018-05-01 09:29:32 -04:00
Rob Rix
4e15b94309 📝 the reason for the traceMs. 2018-05-01 09:28:44 -04:00
Rob Rix
490f11845d Merge branch 'master' into break-the-loop 2018-05-01 09:27:23 -04:00
Rob Rix
ae7f180eb0 Correct a couple of hints. 2018-04-30 17:29:31 -04:00
Rob Rix
ce8258fe2c Merge branch 'master' into break-the-loop 2018-04-30 17:19:01 -04:00
Josh Vera
753f8b0367 Merge branch 'master' into ruby-self-class 2018-04-30 17:13:22 -04:00
Rob Rix
81a69905a4 Revert "Module table entries have to be non-empty."
This reverts commit 9a5e83caec105358018b05c75095743cbbe80905.
2018-04-30 17:13:03 -04:00
Rob Rix
7c9c975071 Module table entries have to be non-empty. 2018-04-30 17:11:34 -04:00
Rob Rix
216b414995 LoadError doesn’t need a type parameter for the value. 2018-04-30 16:40:27 -04:00
Rob Rix
e738e91fa8 🔥 redundant constraints. 2018-04-30 16:31:25 -04:00
Rob Rix
e27541a7d8 Load & require use an EvalModule effect. 2018-04-30 16:20:54 -04:00
Patrick Thomson
214045dd98 Add support for array indexing.
To test:

```ruby
x = [1,2,3]
x[2]
```

should yield 3.
2018-04-30 16:13:19 -04:00
Rob Rix
25eafb5c53 Rename Eval to EvalClosure. 2018-04-30 15:50:05 -04:00
joshvera
47bcf721ad Replace ScopedEnvironmentError with EnvironmentLookupError 2018-04-30 15:33:32 -04:00
Rob Rix
7e2d181e66 Decouple evaluation of closure bodies from Evaluatable. 2018-04-30 15:23:17 -04:00
Rob Rix
01d16b1542 Rename lower to lowerBound. 2018-04-30 14:11:16 -04:00
Rob Rix
2fc2090e02 Move ValueError & throwValueError into Data.Abstract.Value. 2018-04-27 10:09:03 -04:00
Rob Rix
33d68f9d8d Treat breaks as an effect. 2018-04-27 10:00:07 -04:00
Rob Rix
2d8d27f645 Treat continues as an effect. 2018-04-27 09:48:18 -04:00
Rob Rix
ef4ad20252 Show an error message for uncaught returns. 2018-04-27 09:35:22 -04:00
Rob Rix
e7daba2677 Note the semantics of resuming uncaught returns. 2018-04-27 09:34:03 -04:00
Rob Rix
97c76c7fdc Rename ReturnThrow to Return, and use it as an effect. 2018-04-27 09:26:40 -04:00
Rob Rix
8ebf1e99f3 🔥 the origin field of EvaluatorState. 2018-04-26 14:49:00 -04:00
Rob Rix
41eea6bd4f Move LoopThrow & ReturnThrow into Evaluator. 2018-04-26 14:44:01 -04:00
Rob Rix
1942e20af1 🔥 runAnalysis. 2018-04-26 10:17:47 -04:00
Rob Rix
fc33283327 Swap the parameters to Interpreter. 2018-04-26 10:15:06 -04:00
Rob Rix
39a0b21c95 Spacing. 2018-04-26 08:49:28 -04:00
Rob Rix
fa34e9e499 Provide LoadError with an Erroring analysis. 2018-04-26 08:18:47 -04:00
Rob Rix
b9b529076b Give Interpreter a type family for the result type. 2018-04-25 19:12:54 -04:00
Rob Rix
8fd919d20e 🔥 the Monoid instance of Lower. 2018-04-25 18:35:30 -04:00
Rob Rix
2066b33aaf Rename Empty to Lower. 2018-04-25 18:25:02 -04:00
Rob Rix
1e5e766da9 Move the result type to the next line. 2018-04-25 18:11:14 -04:00
Rob Rix
17494e7b78 Reformat the result type. 2018-04-25 18:10:39 -04:00
Rob Rix
a6fbc1fe22 MonadEvaluator does not imply Fail. 2018-04-25 18:10:05 -04:00
Rob Rix
15dcb44302 Make getConfiguration a function rather than a method. 2018-04-25 18:07:06 -04:00
Rob Rix
8d11219264 Move askRoots/extraRoots into Evaluator. 2018-04-25 18:05:07 -04:00
Rob Rix
87f2f982ff Use raiseHandler to lift local into Caching. 2018-04-25 18:04:27 -04:00
Rob Rix
501eb2291f 🔥 a redundant membership constraint. 2018-04-25 18:04:17 -04:00
Rob Rix
032d5bb183 🔥 CachingEffects. 2018-04-25 18:03:17 -04:00
Rob Rix
40fcaa58b9 Define a Retaining analysis. 2018-04-25 17:53:45 -04:00
Rob Rix
f0635c0390 📝 Collecting. 2018-04-25 17:53:37 -04:00
Rob Rix
fbd013c3d8 Sort the deriving clause. 2018-04-25 17:52:17 -04:00
Rob Rix
39e9dc84a6 Apply some “hints,” begrudgingly. 2018-04-25 17:34:43 -04:00
Rob Rix
90e9fbb708 Just say empty. 2018-04-25 16:58:25 -04:00
Rob Rix
028c94e4ec Tidy up a bunch of language extensions. 2018-04-25 16:50:45 -04:00
Rob Rix
beb7261608 Derive the MonadAnalysis instance for TypeChecking. 2018-04-25 16:49:27 -04:00
Rob Rix
2267f24ea8 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-25 16:43:00 -04:00
Rob Rix
6646c8ca27 Rename Quietly to BadSyntax. 2018-04-25 15:44:44 -04:00
Rob Rix
3df75c2947 Derive a bunch of MonadAnalysis instances. 2018-04-25 15:41:30 -04:00
Rob Rix
4375692182 Rephrase MonadHole as a pure AbstractHole class. 2018-04-25 15:28:24 -04:00
Patrick Thomson
35a85e6a06 Merge branch 'master' into resumable-type-errors 2018-04-25 15:19:36 -04:00
Rob Rix
50bbe11d8d Interpret all of the analyses’ effects using raiseHandler. 2018-04-25 12:52:09 -04:00
Rob Rix
8ba011ea8d Use raiseHandler to lift BadValues’ handler. 2018-04-25 12:29:51 -04:00
Rob Rix
16393af491 Spacing. 2018-04-25 12:29:04 -04:00
Rob Rix
2270b0378f Handle ArithmeticError. 2018-04-25 12:18:46 -04:00
Patrick Thomson
83925dc194 Merge branch 'master' into resumable-type-errors 2018-04-25 12:16:31 -04:00
Rob Rix
b875664847 Merge branch 'master' into analyses-provide-and-handle-effects 2018-04-25 12:06:20 -04:00
Rob Rix
6c1eb6f120 Use the Empty instances for the initial values. 2018-04-25 12:05:36 -04:00
Rob Rix
76b00d1074 🔥 the Effects type family. 2018-04-25 11:57:01 -04:00
Timothy Clem
e8488329fd Merge branch 'master' into resume-on-resolutionerror 2018-04-25 07:57:53 -07:00
Rob Rix
0b0bd2a1a8 🔥 Control.Effect.Fresh in favour of Control.Monad.Effect.Fresh. 2018-04-25 10:40:58 -04:00
Rob Rix
2c770138ec Use runFresh instead of runEffect. 2018-04-25 09:58:42 -04:00
Rob Rix
5b18b47db7 Interpreters determine their effects. 2018-04-25 09:07:27 -04:00
Rob Rix
e3e6417994 Extract holes into a new, relatively unconstrained typeclass. 2018-04-25 09:06:36 -04:00
Rob Rix
02572cb49d Parens. 2018-04-25 09:04:30 -04:00
Rob Rix
2da077217c Move Unspecialized handling into Quietly. 2018-04-24 19:44:10 -04:00
Rob Rix
abcf625569 Define an Interpreter instance for Evaluating. 2018-04-24 19:16:24 -04:00
Rob Rix
ef45f3b2ec Define an Interpreter instance for Caching. 2018-04-24 19:02:15 -04:00
Rob Rix
c07272bc7e Define an Interpreter instance for ImportGraphing. 2018-04-24 18:57:22 -04:00
Rob Rix
ff3ba0fa9d Define an Interpreter instance for Collecting. 2018-04-24 18:55:38 -04:00
Rob Rix
b4dd5cffc8 Define an Interpreter instance for Quietly. 2018-04-24 18:53:18 -04:00
Rob Rix
882a542d19 Define a MonadAnalysis instance for DeadCode. 2018-04-24 18:51:56 -04:00
Rob Rix
db99f9efad Define an Interpreter instance for Tracing. 2018-04-24 18:49:26 -04:00
Rob Rix
0adb878ccf Re-export relay from Analysis. 2018-04-24 18:47:17 -04:00
Rob Rix
1cedeac8e1 Move Erroring into its own module. 2018-04-24 18:44:23 -04:00
Rob Rix
7a86d74d10 Define an Interpreter instance for BadVariables. 2018-04-24 18:39:46 -04:00
Rob Rix
5536876e13 Define an Interpreter instance for BadValues. 2018-04-24 18:39:32 -04:00
Rob Rix
ef4ed428cf Define an Interpreter instance for BadModuleResolutions. 2018-04-24 18:39:21 -04:00
Rob Rix
5df26fd4a9 Define an Interpreter instance for BadAddresses. 2018-04-24 18:39:12 -04:00
Rob Rix
68b748139d Swap the order of the BadVariables effects. 2018-04-24 18:39:01 -04:00
Patrick Thomson
5470073205 handle ArithmeticErrors properly. 2018-04-24 18:34:05 -04:00
Timothy Clem
af46dbd3aa Merge remote-tracking branch 'origin/master' into resume-on-resolutionerror 2018-04-24 14:00:07 -07:00
Rob Rix
739687f70e 🔥 a redundant State effect. 2018-04-24 16:59:38 -04:00
Rob Rix
77e8c4c6ed 🔥 some redundant language extensions. 2018-04-24 16:59:19 -04:00
Rob Rix
54d373d5ce 🔥 a redundant State effect. 2018-04-24 16:55:49 -04:00
Rob Rix
6de62e0cf8 🔥 some redundant parens. 2018-04-24 16:55:35 -04:00
Patrick Thomson
e986fdac39 merge fallout + remove MonadFail 2018-04-24 15:56:02 -04:00
Patrick Thomson
4fd34d0412 Merge remote-tracking branch 'origin/master' into resumable-type-errors 2018-04-24 15:50:20 -04:00
Patrick Thomson
f4e0ab8977 Working implementation. 2018-04-24 15:35:50 -04:00
Rob Rix
2875aa90a3 Tidy up the ImportGraphing language extensions. 2018-04-24 14:59:24 -04:00
Patrick Thomson
89c1403f89 WIP 2018-04-24 14:12:28 -04:00
Rob Rix
b042a6a6d4 Provide resumable exceptions in the analyses which resume them. 2018-04-24 13:01:56 -04:00
Rob Rix
a85e41666b Don’t re-export EvaluatorState & State from Evaluating. 2018-04-24 12:01:28 -04:00
Rob Rix
8bb4c0a22c Merge branch 'master' into pass-the-effects-list-around 2018-04-24 11:57:33 -04:00
Rob Rix
812adece0f 🔥 all the MonadFail instances.
We can still fail using `raise (fail …)`, but it’s less convenient now.
2018-04-24 11:45:35 -04:00
Rob Rix
61452e8978 Spacing. 2018-04-24 11:37:06 -04:00
Rob Rix
d1adb3939f Differentiate between unallocated and uninitialized addresses. 2018-04-24 11:34:13 -04:00
Rob Rix
5fa6dc28ea 🔥 MonadFresh. 2018-04-24 11:16:35 -04:00
Rob Rix
d3af580585 Clean up the language extensions. 2018-04-24 11:06:31 -04:00
Rob Rix
f16bf3e5ac Weaken the conditions on the MonadEvaluator & MonadAnalysis instances for Evaluating. 2018-04-24 10:43:42 -04:00
Rob Rix
d79d17768b 🔥 the lens helpers in Evaluating. 2018-04-24 10:37:24 -04:00
Rob Rix
3039dcf8d0 🔥 a couple of redundant membership constraints on the origin. 2018-04-24 10:36:32 -04:00
Rob Rix
4978c8ce24 Define a single, universal instance of MonadModuleTable. 2018-04-24 10:34:50 -04:00
Rob Rix
7d39812ea3 Define a single, universal instance of MonadHeap. 2018-04-24 10:30:21 -04:00
Rob Rix
b109fcd51f Define a single, universal instance of MonadEnvironment. 2018-04-24 10:27:59 -04:00
Rob Rix
ddc06e6aeb Define a single MonadControl instance once and for all. 2018-04-24 10:23:20 -04:00
Rob Rix
035c606dca Move EvaluatingState into Evaluator and rename to EvaluatorState. 2018-04-24 10:18:14 -04:00
Rob Rix
47ba9a6d2b 🔥 a couple of dependencies on EvaluatingState. 2018-04-24 10:00:37 -04:00
Patrick Thomson
9ca80fe933 Merge cruft + rename ControlThrow 2018-04-23 19:31:56 -04:00
Rob Rix
09c21259a2 Parameterize all the typeclasses by the effect type. 2018-04-23 19:12:55 -04:00
Timothy Clem
7f95a26720 Remove this traceM 2018-04-23 15:47:42 -07:00
Timothy Clem
c3bf5133c8 Support Go import graphing a bit better 2018-04-23 15:47:23 -07:00
Timothy Clem
50e359c5a5 Allow getting the current Package 2018-04-23 15:46:56 -07:00
Timothy Clem
faae1a1020 Track the paths we searched in resolution notfound errors 2018-04-23 13:26:21 -07:00
Timothy Clem
d5b67c0613 Use a single NotFoundError instead of language specific ResolutionErrors 2018-04-23 13:18:52 -07:00
Patrick Thomson
a57fd63da5 Add support for break and continue inside loops.
Similar to @charliesome's implementation of return, we throw a
non-resumable exception inside loop invocations, and handle these
cases inside MonadValue's `loop` function.
2018-04-23 12:46:57 -04:00
Charlie Somerville
2e21ecfd16 make ControlThrow a non-resumable exception 2018-04-23 11:54:20 +10:00
Charlie Somerville
41fd599843 rename throwException to throwResumable, resumeException to resume 2018-04-23 11:44:29 +10:00
Charlie Somerville
ae8ca35222 add a ControlThrow exception type 2018-04-20 14:47:49 +10:00
joshvera
19a7e0e4bd appease hlint 2018-04-19 13:52:50 -04:00
joshvera
c8784ffab9 Revert "Yield maybes from scopedEnvironment, and values from ScopedEnvironmentErrors"
This reverts commit d09318a14143b80ae4e90a7192e94b0f9b512bd3.
2018-04-19 13:45:39 -04:00
joshvera
04428df6bd Return holes from uninitialized address errors 2018-04-19 13:12:51 -04:00
joshvera
d8e446f0a7 Add a hole value and don't run a condition if it depends on a hole 2018-04-19 12:20:24 -04:00
joshvera
9d7038a53b Yield maybes from scopedEnvironment, and values from ScopedEnvironmentErrors 2018-04-18 17:56:27 -04:00
joshvera
1fcb16da32 Add logging 2018-04-18 15:16:15 -04:00
joshvera
249e2977ab Throw and catch export errors 2018-04-17 19:12:53 -04:00
Timothy Clem
42f680fc47 Merge remote-tracking branch 'origin/fix-graph-errors' into typescript-graphs 2018-04-17 14:24:41 -07:00
Timothy Clem
8120b2af73 Merge remote-tracking branch 'origin/master' into typescript-graphs 2018-04-17 14:24:10 -07:00
joshvera
a009d78f81 Merge remote-tracking branch 'origin/typescript-graphs' into fix-graph-errors 2018-04-17 17:07:44 -04:00
Patrick Thomson
dfe40b4add Remove fails from Data.Syntax.Literal. 2018-04-17 15:33:45 -04:00
Patrick Thomson
7344a82295 WIP 2018-04-17 15:03:51 -04:00
Timothy Clem
0c5cabd93c Merge remote-tracking branch 'origin/fix-graph-errors' into typescript-graphs 2018-04-17 11:51:03 -07:00
joshvera
457378c1e1 Merge remote-tracking branch 'origin/typescript-graphs' into fix-graph-errors 2018-04-17 14:50:17 -04:00
Timothy Clem
d4769e41ba Throw instead of failing for bad pair value 2018-04-17 11:43:02 -07:00
Timothy Clem
850e8f238a Keep a load stack to break circular loads/imports 2018-04-17 11:02:47 -07:00
joshvera
d752a222aa Add bitwise errors 2018-04-17 13:52:27 -04:00
joshvera
4d63b8163c Add a comparison error 2018-04-17 13:30:18 -04:00
Charlie Somerville
c428ea8fa5 remove Semigroup and Monoid instances for EvaluatingState
these are technically lawful, but don't make a lot of sense for
EvaluatingSense
2018-04-17 16:34:14 +10:00
Timothy Clem
e3713df8e2 Dedicated TypeScriptError, make hlint happy 2018-04-16 18:14:21 -07:00
joshvera
8881a42860 Dont call partial last 2018-04-16 15:49:08 -04:00
Timothy Clem
2beb02387a Merge remote-tracking branch 'origin/master' into graph-cli 2018-04-10 13:04:34 -07:00
Rick Winfrey
979098e42a Add declarationText and declarationLanguage fields too all Declaration data constructors 2018-04-10 11:30:58 -07:00
Timothy Clem
c83d330f4d Pretty imports 2018-04-09 11:00:45 -07:00
Timothy Clem
b7fae056c8 Move instances down 2018-04-09 11:00:27 -07:00
Timothy Clem
db2f4248a7 New option for json import graph output 2018-04-09 10:57:37 -07:00
joshvera
40f8f3a85a Yield the name to resolve 2018-04-06 15:59:19 -04:00
joshvera
1f441ec518 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-05 19:50:59 -04:00
joshvera
4e8569ed01 add an asBool fail to MonadValue Type 2018-04-05 18:46:58 -04:00
joshvera
e927d5fd75 yield the env if there's a namespace error 2018-04-05 18:45:26 -04:00
joshvera
0997ee81e2 Add Numeric2Error and remove TypeError 2018-04-05 18:14:33 -04:00
Rob Rix
b32969f720 🔥 a redundant MonadValue constraint. 2018-04-05 09:46:54 -04:00
joshvera
8c7147c515 Add asBool and feed values to ifthenelse 2018-04-04 13:39:54 -04:00
joshvera
7dd6bb1865 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-04 13:03:21 -04:00
Timothy Clem
a34cc8766f Merge remote-tracking branch 'origin/master' into module-resolution 2018-04-04 09:42:39 -07:00
Timothy Clem
7df5567a92 newtype for free variable name instead of type synonym 2018-04-04 08:59:03 -07:00
joshvera
dd1c39dbd0 Resolve through ruby module resolution errors 2018-04-03 20:03:42 -04:00
joshvera
c759c065be Add another analysis to recover from RubyError 2018-04-03 19:59:39 -04:00
joshvera
a46a40c14c Rename ValueExc to ValueError 2018-04-03 19:33:12 -04:00
joshvera
4c44a3eda4 Handle CallErrors 2018-04-03 19:32:20 -04:00
joshvera
bc91a5f320 Merge remote-tracking branch 'origin/module-resolution' into repo-import-graph 2018-04-03 16:35:33 -04:00
Rob Rix
532203621e 🔥 ><. 2018-04-03 16:35:03 -04:00
Rob Rix
5a4c9b3f91 📝 the helper functions. 2018-04-03 16:34:36 -04:00
Rob Rix
4d03abeab2 Rename/extract helpers. 2018-04-03 16:32:59 -04:00
joshvera
7b9de5d151 Merge remote-tracking branch 'origin/master' into repo-import-graph 2018-04-03 16:19:22 -04:00
Timothy Clem
208d16e131 Disable import-graph specs for now 2018-04-03 10:12:20 -07:00
Timothy Clem
094359bb2d Bring back ability to get the currently evaluating module 2018-04-02 19:22:28 -07:00
Timothy Clem
69a46e4edc Merge remote-tracking branch 'origin/master' into module-resolution 2018-04-02 16:28:35 -07:00
Rob Rix
d8da29d42c Set edge attributes. 2018-04-02 18:59:29 -04:00
Rob Rix
e09c9e2ec7 Specialize the attributes for package/module vertices. 2018-04-02 18:50:18 -04:00
Rob Rix
1de632117b Extract the style. 2018-04-02 18:34:24 -04:00
Rob Rix
29159c7752 🔥 parentGraph. 2018-04-02 18:31:37 -04:00
Rob Rix
6d7b41170c Tweak the modify helper to append. 2018-04-02 18:30:21 -04:00
Rob Rix
a230af496b Wrap up definition edges in a new helper. 2018-04-02 18:28:40 -04:00
Rob Rix
b907fabbf0 Rename insertVertex to inclusion. 2018-04-02 18:20:51 -04:00
Rob Rix
92b4cb9168 Insert vertices rather than names. 2018-04-02 18:19:56 -04:00
Rob Rix
1d375d8d61 Compute the parent graph. 2018-04-02 18:17:58 -04:00
Rob Rix
40269c8fc5 Abstract the selection of the module graph. 2018-04-02 18:16:25 -04:00
Rob Rix
d2713eca19 Rename packageVertex to packageGraph. 2018-04-02 18:15:30 -04:00
Rob Rix
a87fe24e2f Use the Vertex type to contextualize names. 2018-04-02 18:14:01 -04:00
Rob Rix
4449a44cb3 📝 Vertex. 2018-04-02 18:08:26 -04:00
Rob Rix
9186742ba1 Define a Vertex datatype. 2018-04-02 18:08:02 -04:00
Rob Rix
52009b0c89 Merge branch 'package-abstraction' into resolved-symbols-in-import-graph 2018-04-02 18:02:31 -04:00
Rob Rix
aef145b55c Use withSomeOrigin to unpack the origin. 2018-04-02 17:33:53 -04:00
Rob Rix
eec36b64ff Add the package to the graph. 2018-04-02 17:11:36 -04:00
Rob Rix
a16f1f7a1d Draw edges between modules and symbol references. 2018-04-02 17:02:51 -04:00
Rob Rix
c90791c188 Use withSomeOrigin to unpack the origin. 2018-04-02 17:02:34 -04:00
Rob Rix
b10872a79f 🔥 a redundant comment. 2018-04-02 16:36:28 -04:00
Timothy Clem
a3d35ac9a0 WIP: Attempt to back out Identifiers as qualified names 2018-04-02 10:40:52 -07:00
Rob Rix
27b6ba5204 Resolution edges point from names to defining modules.
Co-Authored-By: Josh Vera <vera@github.com>
2018-04-02 11:05:17 -04:00
Rob Rix
fad3e6e4ef Add edges for symbols.
Co-Authored-By: Josh Vera <vera@github.com>
2018-04-02 10:59:19 -04:00
Rob Rix
78997cdeb3 Modify the import graph strictly.
Co-Authored-By: Josh Vera <vera@github.com>
2018-04-02 10:52:36 -04:00
Rob Rix
cc0f73b1ed 🔥 MonadNonDet. 2018-04-02 10:14:46 -04:00
Rob Rix
351f757ed4 Move pushOrigin into Evaluatable. 2018-03-30 20:05:40 -04:00
Rob Rix
1de09bbb25 termOrigin takes a whole term. 2018-03-30 20:05:30 -04:00
Rob Rix
c73166d089 moduleOrigin takes a Module again. 2018-03-30 19:50:38 -04:00
Rob Rix
37535b1823 Origin stores ModuleInfo. 2018-03-30 19:44:31 -04:00
Rob Rix
11c584b6ff Split module name/path into a ModuleInfo type. 2018-03-30 19:42:31 -04:00
Timothy Clem
b680076d30 Merge remote-tracking branch 'origin/master' into module-resolution 2018-03-30 16:14:48 -07:00
Timothy Clem
9089ad998d Turn at least this one back on 2018-03-30 16:01:49 -07:00
Timothy Clem
3dba4c0d37 Don't worry about this for now 2018-03-30 14:54:59 -07:00
Timothy Clem
4f9978c063 Disable this for now 2018-03-30 11:52:42 -07:00
Timothy Clem
2fb6e73e9a Move side effect imports to Go's syntax 2018-03-30 11:16:10 -07:00
Rob Rix
8796f915d4 Parameterize origin fields by () rather than term. 2018-03-30 13:55:21 -04:00
Rob Rix
1a37682084 🔥 MonadOrigin. 2018-03-30 13:42:49 -04:00
Rob Rix
754dfe7889 Use the origin effect for the current module. 2018-03-30 13:39:12 -04:00
Rob Rix
7cd0932197 Origins hold packages/modules/terms directly. 2018-03-30 13:28:48 -04:00
Rob Rix
ee145328a6 🔥 redundant parens. 2018-03-30 11:00:14 -04:00
Rob Rix
d3b2baa1b2 Define a single, universal instance of MonadOrigin. 2018-03-30 00:03:23 -04:00
Rob Rix
2ff1507410 Push the origin for the current term in analyzeTerm. 2018-03-29 23:58:10 -04:00
Rob Rix
424cac7ab2 Define a MonadOrigin instance for Evaluating. 2018-03-29 23:28:32 -04:00
Rob Rix
fdb94b085d MonadAddressable depends on MonadFresh instead of MonadHeap. 2018-03-29 22:30:23 -04:00
Rob Rix
6fff428352 Parameterize ValueExc by the location type. 2018-03-29 21:39:34 -04:00
Rob Rix
7641b20d06 🔥 some obsolete comments referencing LocationFor. 2018-03-29 21:37:33 -04:00
Rob Rix
1689b622ba Parameterize MonadAnalysis by the location type. 2018-03-29 21:36:11 -04:00
Rob Rix
c4fcb23601 Parameterize MonadValue by the location type. 2018-03-29 21:07:35 -04:00
Rob Rix
ceed6c844a Parameterize MonadEvaluator by the location type. 2018-03-29 20:58:36 -04:00
Rob Rix
cb2b38da08 Parameterize MonadModuleTable by the location type. 2018-03-29 20:50:08 -04:00
Rob Rix
0c57eca3e0 Parameterize MonadEnvironment by the location type. 2018-03-29 20:46:17 -04:00
Rob Rix
c6d06c632b Parameterize MonadHeap by the location type. 2018-03-29 20:38:23 -04:00
Rob Rix
8da7ec2374 Correct a documentation comment. 2018-03-29 19:39:59 -04:00
Rob Rix
749e366189 Sort another context. 2018-03-29 18:28:30 -04:00
Rob Rix
3337a40517 Rename RequiredEffects to Effects. 2018-03-29 18:25:49 -04:00
Rob Rix
de14ef7625 Align all the derived instances. 2018-03-29 18:07:00 -04:00
Rob Rix
5f4b68804c Export the types only but without the explicit namespace. 2018-03-29 18:03:48 -04:00
Rob Rix
9673375765 🔥 a redundant hide. 2018-03-29 18:01:39 -04:00
Rob Rix
dd9e454583 Inline the definition of trace. 2018-03-29 18:01:16 -04:00
Rob Rix
7f019d44e0 🔥 some indentation. 2018-03-29 17:59:25 -04:00
Rob Rix
90b79c73f9 Modify strictly. 2018-03-29 17:58:59 -04:00
Rob Rix
ca9533b06e 🔥 the term & value parameters. 2018-03-29 17:56:22 -04:00
Timothy Clem
00ec68ce08 Fix up import graph 2018-03-29 14:12:36 -07:00
joshvera
e56781741c Add docs 2018-03-29 11:36:02 -04:00
joshvera
bcd202d442 format 2018-03-29 11:28:01 -04:00
joshvera
9832779676 Add type signature 2018-03-29 11:27:41 -04:00
joshvera
46274ad9ef Move insertVertexName to its own function 2018-03-29 11:22:58 -04:00
joshvera
233f7abfbd Add BadValues analysis 2018-03-28 17:42:11 -04:00
joshvera
e8db080923 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 13:12:20 -04:00
joshvera
9043193e13 Merge remote-tracking branch 'origin/master' into less-fail 2018-03-28 12:01:58 -04:00
Rob Rix
1d3c09a9d2 Use .= to define localEvaluatingState. 2018-03-28 08:56:02 -04:00
Rob Rix
5ae24ddc89 Merge branch 'master' into combined-state-effects 2018-03-28 08:33:19 -04:00
Rob Rix
f7afd2c4b4 Only reset a single field using localEvaluatingState. 2018-03-28 08:22:04 -04:00
Rob Rix
e1dabed456 Derive Eq, Ord, & Show instances for EvaluatingState. 2018-03-28 07:56:11 -04:00
Charlie Somerville
3fe504c97e add BadVariable analysis catching FreeVariableError 2018-03-28 12:06:33 +11:00
Charlie Somerville
b1a195f7e7 add EvalError type with FreeVariableError constructor 2018-03-28 11:24:37 +11:00
Charlie Somerville
7abffcf7bc rename EvalError type to LoadError 2018-03-28 11:12:38 +11:00
joshvera
4eaffa9f49 Catch LoadErrors in ImportGraph analysis and inject them into the Import Graph 2018-03-27 17:00:25 -04:00
joshvera
68423dd298 Store enough information in LoadError 2018-03-27 16:11:43 -04:00
Rob Rix
bf2bab5255 Modify the state strictly. 2018-03-27 15:41:43 -04:00
Rob Rix
107274d4dd 🔥 some redundant imports. 2018-03-27 15:25:57 -04:00
Rob Rix
e9cac9d0c2 🔥 find*, in favour of EvaluatingState fields. 2018-03-27 15:24:28 -04:00
Rob Rix
e40b34d691 Export EvaluatingState. 2018-03-27 15:08:28 -04:00
Rob Rix
ee2a948186 Use gets to view state. 2018-03-27 15:05:22 -04:00
Rob Rix
7b90a0192b Prefix the lenses instead of the fields. 2018-03-27 15:03:26 -04:00
Rob Rix
ec972b1567 Define the lenses without TH. 2018-03-27 15:00:49 -04:00
joshvera
d0cdd12334 Add EvalError and throw FreeVariableError 2018-03-27 13:11:51 -04:00
Timothy Clem
505562126a Fix toc summary tests now that ruby classes have their own syntax 2018-03-26 15:15:38 -07:00
Rob Rix
6b0b0f908d Tighten up the comments. 2018-03-26 17:55:15 -04:00
Rob Rix
a9388ff118 Use a single combined State type. 2018-03-26 15:34:37 -04:00
Rob Rix
1fd8779349 Define Semigroup & Monoid instances for EvaluatingState. 2018-03-26 15:29:32 -04:00
Rob Rix
b80f925ec6 Spacing. 2018-03-26 15:13:04 -04:00
Rob Rix
e9b889ac0c Define an analogue of localState. 2018-03-26 15:12:54 -04:00
Rob Rix
a56d755e8c Specialize .= and view to Evaluating. 2018-03-26 15:12:36 -04:00
Timothy Clem
724d8f38aa Fix up pulling out go package name for import rendering 2018-03-26 12:02:27 -07:00
Rob Rix
adaeb50be1 Define a getter action. 2018-03-26 13:53:20 -04:00
Rob Rix
bc89aa960a Define a setter action. 2018-03-26 13:50:43 -04:00
joshvera
859c4702b0 Merge remote-tracking branch 'origin/master' into default-typeapplications 2018-03-26 13:18:21 -04:00
Rob Rix
58b6c5ab04 Make lenses for EvaluatingState. 2018-03-26 13:13:59 -04:00
Rob Rix
4d85b1f18e Define an evaluating state type. 2018-03-26 12:48:21 -04:00
Rob Rix
b36b6c38c1 Tidier language pragmas. 2018-03-26 12:36:19 -04:00
Rob Rix
41f2cdd6a9 Merge branch 'master' into quiet-analysis 2018-03-26 12:30:19 -04:00
Rob Rix
eda416652c 🔥 the type keyword which is making stylish-haskell sad. 2018-03-26 12:02:54 -04:00
Rob Rix
14daa52137 Tidy up the language pragmas. 2018-03-26 12:02:36 -04:00
Rob Rix
6dd5e5954a 🔥 some quantification. 2018-03-26 12:01:49 -04:00
joshvera
126cdc5285 Make typeapplications a default extension 2018-03-26 12:00:19 -04:00
Rob Rix
f14135a0f5 Merge branch 'imports,-graphed' into evaluate-in-the-outer-analysis 2018-03-26 11:48:50 -04:00
Rob Rix
bfd3aa8e0d Merge branch 'master' into imports,-graphed 2018-03-26 11:34:35 -04:00
Rob Rix
5ded571e83 📝 Quietly. 2018-03-26 10:41:11 -04:00
Rob Rix
24b98ced9b 🔥 some unnecessary scoped type variables. 2018-03-26 10:31:41 -04:00
Rob Rix
a8578c69bf Don’t silence exceptions in Evaluating. 2018-03-26 10:31:24 -04:00
Rob Rix
587c078171 Silence unspecialized exceptions. 2018-03-26 10:28:14 -04:00
Rob Rix
a9c5955027 Merge remote-tracking branch 'origin/remove-fail' into quiet-analysis 2018-03-26 10:21:32 -04:00
Rob Rix
b7f7ff3e68 Merge branch 'master' into remove-fail 2018-03-26 10:08:54 -04:00
Rob Rix
d298077096 Stub in a MonadAnalysis instance. 2018-03-26 10:07:43 -04:00
Rob Rix
a4aae6a70c Rename Quiet to Quietly. 2018-03-26 10:05:59 -04:00
Rob Rix
8b5ab170c3 Derive some standard instances. 2018-03-26 10:05:41 -04:00
Rob Rix
35e0063de9 Add a newtype for a quiet analysis. 2018-03-26 10:05:05 -04:00
Rob Rix
44f03209c4 Stub in a module for a quiet analysis. 2018-03-26 10:02:20 -04:00
Rob Rix
598c02ce21 Merge branch 'master' into imports,-graphed 2018-03-26 09:46:08 -04:00
Rob Rix
b221649b75 Merge branch 'master' into evaluate-in-the-outer-analysis 2018-03-26 09:40:42 -04:00
Rob Rix
c95f103783 Merge branch 'imports,-graphed' into evaluate-in-the-outer-analysis 2018-03-24 01:00:23 -04:00
Rob Rix
bc27cb2c15 🔥 2018-03-24 00:51:43 -04:00
Rob Rix
659bcc43a9 Align some things. 2018-03-24 00:42:31 -04:00
Rob Rix
2e228604cf Merge branch 'master' into imports,-graphed 2018-03-24 00:35:50 -04:00
Rob Rix
ca9476000b Move the Recursive constraint into the MonadEvaluatable synonym. 2018-03-23 20:38:47 -04:00
Rob Rix
3800759ba3 Simplify the context for Evaluating’s MonadAnalysis instance. 2018-03-23 20:35:17 -04:00
Rob Rix
8fe368145d 🔥 the EvaluateModule exception. 2018-03-23 20:31:15 -04:00
Rob Rix
2cce44a9ec Clean up a ton of imports. 2018-03-23 20:16:04 -04:00
Rob Rix
468d85bb2c what if analysis composition worked 2018-03-23 19:50:04 -04:00
Patrick Thomson
3c22514063 Merge branch 'master' into preludes-and-subclassing 2018-03-23 18:10:49 -04:00
joshvera
cf4a87068e Merge remote-tracking branch 'origin/master' into preludes-and-subclassing 2018-03-23 17:56:26 -04:00
joshvera
37699190a7 redundant imports 2018-03-23 17:42:50 -04:00
Josh Vera
6961a46dfa Merge branch 'master' into free-variables-as-list 2018-03-23 17:41:42 -04:00
joshvera
a149c76a05 Merge remote-tracking branch 'origin/master' into remove-fail 2018-03-23 17:40:22 -04:00
joshvera
ba3969c4b0 Merge remote-tracking branch 'origin/master' into query-final-helpers 2018-03-23 17:03:25 -04:00
joshvera
560951bb24 Use Resumable from effects 2018-03-23 16:29:15 -04:00
joshvera
35db5bac01 hlint warnings 2018-03-23 15:43:34 -04:00
joshvera
dbaf374d3a Merge remote-tracking branch 'origin/master' into remove-fail 2018-03-23 15:29:47 -04:00
Josh Vera
745eb85ee7 Merge branch 'master' into preludes-and-subclassing 2018-03-23 15:26:41 -04:00
Rob Rix
85650c06df Merge branch 'master' into imports,-graphed 2018-03-23 15:26:11 -04:00
Patrick Thomson
82bceec658 fix some comments 2018-03-23 14:44:17 -04:00
Timothy Clem
a079efbf0b Free variables as a List (and only create a set when needed) 2018-03-23 11:40:25 -07:00
Timothy Clem
417b9ec965 Extra parens 2018-03-23 10:37:40 -07:00
Timothy Clem
7f71e27df4 Some helpers to query Final 2018-03-23 10:11:29 -07:00
joshvera
65e2d81564 Don't warn on orphans 2018-03-23 11:56:39 -04:00
Patrick Thomson
3e3ad4f078 very bad, no good hack to fix a lot of the tests 2018-03-23 11:25:05 -04:00
Rob Rix
fc3a42ab4f Revert "Invert the overall order of the effect list."
This reverts commit 0cb27ae3865a6e6e8f2cb11d58c5190c1be550e7.
2018-03-23 11:04:34 -04:00
Rob Rix
2c8cb8e67a Invert the overall order of the effect list.
This puts outer analyses results at the outermost level of values.
2018-03-23 11:01:42 -04:00
joshvera
68ca81ad97 Merge branch 'module-resolution' into remove-fail 2018-03-23 11:01:13 -04:00
joshvera
393f136669 Fix equality instance for SomeExc 2018-03-23 10:55:53 -04:00
Rob Rix
a5067cb018 Move require/load to Data.Abstract.Evaluatable. 2018-03-23 10:38:33 -04:00
joshvera
9b2524cc81 Merge branch 'module-resolution' into default-extensions 2018-03-23 10:31:07 -04:00
Rob Rix
9c0b5f7ab6 Merge branch '🔥-ghc-mod' into imports,-graphed 2018-03-23 10:26:13 -04:00
joshvera
2358187357 align 2018-03-22 19:31:47 -04:00
joshvera
2e794e92a5 align 2018-03-22 19:31:08 -04:00
Rob Rix
dd755a4f0b Use EvaluateModule to signal module loads. 2018-03-22 19:28:43 -04:00
joshvera
07baeca6be Kind of add the Eq instances 2018-03-22 19:28:06 -04:00
Rob Rix
8530a288cd Define a single instance of MonadThrow. 2018-03-22 19:27:31 -04:00
joshvera
21df1063fc Add Unspecialized and ValueExc resumable exceptions 2018-03-22 19:09:40 -04:00
joshvera
3b40f0af96 Add a Resumable1 exception 2018-03-22 19:08:05 -04:00
Josh Vera
7792356012 Merge branch 'master' into default-extensions 2018-03-22 15:43:31 -04:00
Josh Vera
a2e73afd45 Merge branch 'master' into module-resolution 2018-03-22 15:42:44 -04:00
Rob Rix
b17b8e5c96 Merge remote-tracking branch 'origin/module-resolution' into imports,-graphed 2018-03-22 15:31:30 -04:00
Rob Rix
2db0e7151b Define an analyzeModule method on MonadAnalysis.
This allows us to chain per-module analysis in the same manner as per-term analysis.
2018-03-22 13:59:32 -04:00
Patrick Thomson
693045439a Add test suite. 2018-03-22 13:02:39 -04:00
joshvera
d816fceaf3 Beautify IdentifierName to test 2018-03-22 13:02:10 -04:00
Patrick Thomson
1e2fc5f6d3 Merge remote-tracking branch 'origin/master' into preludes-and-subclassing 2018-03-22 12:50:16 -04:00