
On 07/10/11 15:37, Felipe Almeida Lessa wrote:
You don't need to do it, it is already done =). See the pool package by Michael Snoyman on Hackage [1]. More specifically, see createPoolCheckAlive [2].
Cheers,
[1] http://hackage.haskell.org/package/pool [2] http://hackage.haskell.org/packages/archive/pool/0.1.0.2/doc/html/Data-Pool....
How do people use this stuff? The README is empty, there's no documentation, and none of the functions are commented. I'm forced to conclude that there are people capable of looking at this, createPoolCheckAlive :: MonadControlIO m => IO a -> (a -> IO ()) -> Int -> (Pool a -> m b) -> (a -> IO Bool) -> m b and knowing immediately what it does. I'm still a beginner, and I don't think I have a use for this package (what does it do?), but I've run into similar situations with other packages and would genuinely like to know (as opposed to just complain about it).