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
joshvera
f7e6609069
Remove readProjectEntry
2018-04-25 12:10:33 -04:00
joshvera
0c8450edb6
Fix interface for graph
2018-04-25 12:08:32 -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
7670c44a5e
📝 Interpreter.
2018-04-25 12:03:17 -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
9b7079c9eb
Bump effects for https://github.com/joshvera/effects/pull/34
2018-04-25 10:40:20 -04:00
Rob Rix
b074cc35ab
🔥 mergeEither.
2018-04-25 10:02:08 -04:00
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