[Haskell-cafe] Absolutely confused with error/exception handling
saurabhnanda at gmail.com
Sat Dec 17 03:46:00 UTC 2016
To generalise the problem, because I've encountered it in other places as
well, how does one write his/her own instance of MonadIO, MonadThrow, or
MonadCatch for complicated transformer stacks such has ActionCtxT?
On 17 Dec 2016 3:13 am, "Brandon Allbery" <allbery.b at gmail.com> wrote:
> On Fri, Dec 16, 2016 at 7:30 AM, Saurabh Nanda <saurabhnanda at gmail.com>
>> How do I catch an exception coming out of an action in the ActionCtxT
> I think I'm going to have to let someone else answer. I just got lost in
> MonadBaseControl, not to mention how you do this if all you have is the
> ActionCtxT and not the WebStateT where Spock actually handles exceptions. :/
> If it helps, exception handling is known to be a sewer --- because it
> can't be done in a clean and generic way without introducing significant
> resource leaks and other problems. And MonadBaseControl works when you (or
> the developer, in this case of Spock) define the right instances, but is
> doing it the hard way.
> brandon s allbery kf8nh sine nomine
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe