1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00
Commit Graph

21063 Commits

Author SHA1 Message Date
Rob Rix
7cf79573e3 🔥 RunEffects/RunEffect. 2018-04-25 10:01:36 -04:00
Rob Rix
2c770138ec Use runFresh instead of runEffect. 2018-04-25 09:58:42 -04:00
Rob Rix
192367da0b Extract a runFresh helper. 2018-04-25 09:58:21 -04:00
Rob Rix
86ef19bbb0 Bump effects to master. 2018-04-25 09:52:44 -04:00
Patrick Thomson
13a01fc3b1 Merge pull request #1779 from github/catch-arith-exceptions
Catch and bubble up ArithExceptions that handle in math operations.
2018-04-25 09:48:36 -04:00
Rob Rix
dabca7feea Bump effects for https://github.com/joshvera/effects/pull/33 2018-04-25 09:44:22 -04:00
Patrick Thomson
c94f21b734 No need to NOINLINE the function that calls attemptUnsafeArithmetic. 2018-04-25 09:42:45 -04:00
Rob Rix
4ddbe2b132 Move Interpreter into Control.Effect. 2018-04-25 09:28:57 -04:00
Rob Rix
227b3296c5 runAnalysis & runSomeAnalysis use Interpreter. 2018-04-25 09:26:48 -04:00
Rob Rix
5b18b47db7 Interpreters determine their effects. 2018-04-25 09:07:27 -04:00
Rob Rix
d0b31667ab 🔥 a redundant language extension. 2018-04-25 09:06:45 -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
0d6cf85333 Generalize the type of variable. 2018-04-24 20:01:05 -04:00
Rob Rix
8d5efedf57 Generalize throwValueError, throwLoadError, and throwEvalError. 2018-04-24 19:55:51 -04:00
Rob Rix
2da077217c Move Unspecialized handling into Quietly. 2018-04-24 19:44:10 -04:00
Rob Rix
beea1ba3c2 🔥 a redundant $!. 2018-04-24 19:26:08 -04:00
Rob Rix
abcf625569 Define an Interpreter instance for Evaluating. 2018-04-24 19:16:24 -04:00
Rob Rix
c9e893dd34 Define an Interpreter instance for Eff. 2018-04-24 19:05:00 -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
b032d91900 Define an Interpreter instance for Erroring. 2018-04-24 18:39:57 -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
Rob Rix
25af1cfcaa Define an Interpreter typeclass for effectful computations which can interpret their effects. 2018-04-24 18:31:09 -04:00
Patrick Thomson
61c63e0dcc Catch and bubble up ArithExceptions that handle in math operations.
Rather than writing Either-aware functions for all uses of division
and modulus and replumbing all of `liftIntegralFrac` to account for
these changed type signatures, the simplest and most robust solution
is to use `unsafePerformIO` to lift `Control.Exception.try` into pure
code, then dispatch on the returned `Either` value and inject the
resulting `ArithException`, if any, into a `ValueError`.

A post on Haskell-cafe by Wren N. G. Thornton asserts that this
particular use of unsafePerformIO does the right thing.

Ultimately, if the world were a better place, the type signatures
of `/` and `div` would indicate that they are the partial functions
that in actuality they are. Unfortunately, Haskell chose to make the
pragmatic but immoral choice.
2018-04-24 18:24:36 -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
joshvera
6c4f1c33bd cleanup imports 2018-04-24 16:33:16 -04:00
Josh Vera
48c471e9d6 Merge branch 'master' into project-dir 2018-04-24 16:31:20 -04:00
joshvera
d4ac097291 Appease hlint 2018-04-24 16:30:39 -04:00
joshvera
c72ae3c161 Remove entry point from list of paths 2018-04-24 16:29:40 -04:00
joshvera
c6bbda32c5 Remove packages 2018-04-24 16:26:09 -04:00
joshvera
d2e32fd50b go is really about entryPoints 2018-04-24 16:19:54 -04:00
joshvera
c20b882c5b Add projectEntryPoints back 2018-04-24 16:14:01 -04:00
Timothy Clem
71102dcef8 Resumable ResolutionErrors for PHP 2018-04-24 13:06:26 -07:00
Patrick Thomson
e986fdac39 merge fallout + remove MonadFail 2018-04-24 15:56:02 -04:00