can I use fx block with `Kind<F, Option<Some...
# arrow
s
can I use fx block with
Kind<F, Option<Something>>
where
F
is
MonadError
? (arrow 0.10)?
fx.monad { }
did the trick
b
fx.monad { }
may only enable the
Monad
combinators; if you were looking to use `catch`/etc. you may need something like
fx.monadError
(or
fx.monadThrow
or ...)
s
got it, thanks
b
I would be surprised if the
raiseError
syntax was enabled in
fx.monad {}
but if it works, it works
👍 1
p
@Bob Glamm the monomorphic versions are enabled, the ones you can import
r
Option can only produce a valid monad error instance and that is with Unit
I’m not even sure we have that in Arrow.
Essentially None and Unit are isomorphic and Unit can be used to represent the absence over
MonadError<F, Unit>
This instance and if it’s not there it would enable handleErrorWith etc or use Option over where you want to disregard errors in an output.
The issue is that largely nobody writes polymorphic programs where the E is Unit almost all of our programs are constrained to Throwable and a Explicit hierarchy of E