[Haskell-cafe] Absolutely confused with error/exception handling
Brandon Allbery
allbery.b at gmail.com
Fri Dec 16 04:52:26 UTC 2016
On Thu, Dec 15, 2016 at 11:50 PM, Saurabh Nanda <saurabhnanda at gmail.com>
wrote:
> Apologies, but I couldn't understand the example. In an exception where
> it's not even possible to know the stack trace easily, I don't expect to
> know the state of the computation. It's an exception -- it is alright if it
> doesn't have the state. But at least allow me to catch the exception in
> MonadIO.
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.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20161215/4d196539/attachment.html>
More information about the Haskell-Cafe
mailing list