I have a result CE in Cvdm.ErrorHandling for monadic error handling. For the example below, sideEffect1 and sideEffect2 are never invoked, since do! binds an error (I think also Delay is involved, but I don't have a clear grasp of CE builders).
let _ = result {
if true then
do! Error err
sideEffect1 ()
sideEffect2 ()
}
However, if I replace result with monad (or monad.fx or others, I've tried them all), the side effects are invoked.
Is it possible to get my desired behavior using a generic CE from FSharpPlus?
I have a
resultCE in Cvdm.ErrorHandling for monadic error handling. For the example below,sideEffect1andsideEffect2are never invoked, sincedo!binds an error (I think alsoDelayis involved, but I don't have a clear grasp of CE builders).However, if I replace
resultwithmonad(ormonad.fxor others, I've tried them all), the side effects are invoked.Is it possible to get my desired behavior using a generic CE from FSharpPlus?