You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the absence of MonadError and the reexport of ExceptT is a confusing choice.
As rightfully mentioned in #13 Universum already includes MonadThrow and MonadCatch, however these interact with ExceptT in ... possibly confusing ways.
The principle problem here is that MonadThrow and MonadCatch are supposed to catch actual Exceptions, not the user defined errors that are used in ExceptT. While I understand and agree with this decision it may be strange for newer users of MonadThrow.
Specifically with the omission of MonadError there is no (sensible) way to interact with a stack containing ExceptT and throw an error into ExceptT or catch it.
My suggestion is to remove ExceptT from the library entirely as it is not particularly useful anyways when actual exceptions are available.
Alternatively I would suggest reversing the decision from #13 and reintroduce MonadError to allow users to interact with ExceptT.
The text was updated successfully, but these errors were encountered:
Hm, strange, I am reading discussion in #13 and see this:
Also I will remove Control.Monad.Except module if no one objects. Seems like nobody uses ExceptT, runExceptT and other stuff.
Apparently it was intended to remove ExceptT, but somehow it survived.
I don't want to browse history to understand whether it was removed and then re-added or it wasn't removed at all. My latest experience with ExceptT is that it can sometimes be useful, but sometimes its usage may even be harmful and it's not something that should be exported from a custom prelude.
So I approve removal of ExceptT and runExceptT, but it's a breaking change and we need more opinions on that.
I find ExceptT to be generally very useful in different situations -- the most popular use case is just wrapping some specific function in the runExceptT call so that it's possible to handle multiple local exit points in a handy way. I'm mostly against wrapped/nested ExceptT and using MonadError in general, so the ExceptT with the runner function is enough I think. Actually, I'd like to have the throwError also, but it'd be better to have it specialised to the ExceptT exclusively.
I think the absence of
MonadError
and the reexport ofExceptT
is a confusing choice.As rightfully mentioned in #13 Universum already includes
MonadThrow
andMonadCatch
, however these interact withExceptT
in ... possibly confusing ways.The principle problem here is that
MonadThrow
andMonadCatch
are supposed to catch actualException
s, not the user defined errors that are used inExceptT
. While I understand and agree with this decision it may be strange for newer users ofMonadThrow
.Specifically with the omission of
MonadError
there is no (sensible) way to interact with a stack containingExceptT
and throw an error intoExceptT
or catch it.My suggestion is to remove
ExceptT
from the library entirely as it is not particularly useful anyways when actual exceptions are available.Alternatively I would suggest reversing the decision from #13 and reintroduce
MonadError
to allow users to interact withExceptT
.The text was updated successfully, but these errors were encountered: