[Haskell-cafe] Handling exceptions or gracefully releasing resources
evohunz at gmail.com
Wed Jan 30 14:15:53 CET 2013
Felipe, I'm trying to use your Hipmunk package. :)
The resources I need to keep around are the objects used for the simulation.
Do you recomend using "resourcet" to handle this or something else?
2013/1/30 Felipe Almeida Lessa <felipe.lessa at gmail.com>
> Everything that Johan Tibell said + you may be interested in the
> resourcet package  (which is used by conduit to handle resources).
>  http://hackage.haskell.org/package/resourcet
> On Tue, Jan 29, 2013 at 8:59 PM, Thiago Negri <evohunz at gmail.com> wrote:
> > `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.
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe