[Haskell-cafe] Absolutely confused with error/exception handling

Saurabh Nanda saurabhnanda at gmail.com
Fri Dec 16 07:30:31 UTC 2016


>
> Use liftIO for that; that's what MonadIO is for. I expected you were
> needing to go the other way, because if you have MonadIO then you have IO
> via liftIO.
>


The type signature for catch is --

catch :: Exception e => IO a -> (e -> IO a) -> IO a

This is Spock's monad:
https://hackage.haskell.org/package/Spock-core-0.11.0.0/docs/Web-Spock-Action.html#t:ActionCtxT
(it has MonadTrans, MonadIO, Monad, Functor, Applicative, Alternative
instances).

How do I catch an exception coming out of an action in the ActionCtxT monad?

-- Saurabh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161216/101927b9/attachment.html>


More information about the Haskell-Cafe mailing list