[Haskell-cafe] Handling exceptions or gracefully releasing resources

Thiago Negri evohunz at gmail.com
Tue Jan 29 23:59:14 CET 2013


`Control.Exception.bracket` is a nice function to acquire and release a
resource in a small context.

But, how should I handle resources that are hold for a long time?

Should I put `Control.Exception.finally` on every single line of my
finalizers?
What exceptions may occur on an IO operation?
Every IO function has the risk of throwing an exception?

Thanks,
Thiago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130129/6239207c/attachment.htm>


More information about the Haskell-Cafe mailing list