Re: [Haskell-cafe] Re: How to reliably open and close resources inMonadIO in the presence of exceptions?

2009-10-16 Thread Bas van Dijk
On Fri, Oct 16, 2009 at 1:16 PM, Bayley, Alistair
 wrote:
> You might want this library:
> http://hackage.haskell.org/packages/archive/MonadCatchIO-transformers/0.
> 0.1.0/doc/html/Control-Monad-CatchIO.html

Thanks, this is exactly what I need!

regards,

Bas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


RE: [Haskell-cafe] Re: How to reliably open and close resources inMonadIO in the presence of exceptions?

2009-10-16 Thread Bayley, Alistair
> -Original Message-
> From: haskell-cafe-boun...@haskell.org 
> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Bas van Dijk
> 
> 
> I could of course write a genAlloca if the MonadIO class was extended
> with a bracket method:
> 
> Besides extending MonadIO with bracket, maybe it's also useful to
> extend it with:
> 
> catch :: Exception e => m a -> (e -> m a) -> m a

You might want this library:
http://hackage.haskell.org/packages/archive/MonadCatchIO-transformers/0.
0.1.0/doc/html/Control-Monad-CatchIO.html

There's also an mtl version; not sure which is to be prefered.

Alistair
*
Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.
*

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe