raulraja
10/04/2017, 7:55 AMMonadError<F, NukeException> exist. In the case of Option it can't provide such an instance because there is no way to store the NukeException, since None which is the unbiased case can't store that error. Same for Try since it's Failure it's fixed to Throwable and NukeException is not in the Throwable hierarchy. The only choice here is Either which is parametric in it's Left case.
attack may be invoked in two different ways:https://gist.github.com/raulraja/40ac0d0f03f4a1a85f6d249464f30a95ersin_ertan
10/04/2017, 2:26 PMmonadError a variable or is it suppose to be ME.buindingE? https://gist.github.com/ersin-ertan/ec0674dc1160158d3eaccc6b2eaf7374raulraja
10/04/2017, 3:10 PMsimon.vergauwen
10/04/2017, 4:26 PMsimon.vergauwen
10/04/2017, 4:28 PMbindingE is only available on MonadError<F, Throwable> as it catches any exceptions thrown within the bindingE block and then calls raiseError(e: Throwable) to model the thrown exception is correctly.simon.vergauwen
10/04/2017, 4:28 PMraulraja
10/04/2017, 4:29 PMME.catch(...)raulraja
10/04/2017, 4:30 PMraiseError underneath if the computation fails.raulraja
10/04/2017, 4:30 PMbindingE is only for general exceptions.ersin_ertan
10/04/2017, 9:01 PMraulraja
10/04/2017, 9:09 PMraulraja
10/04/2017, 9:09 PM