#ifdef __GLASGOW_HASKELL__
import GHC.Base ( Int, Monad(..), (.), not )
import GHC.Err ( undefined )
-import GHC.Exception ( block, unblock, throw, catchException )
+import GHC.Exception ( block, unblock, throw, catchException, catchAny )
import GHC.IOBase ( IO, IORef, newIORef, readIORef, writeIORef, )
import GHC.List ( elem, length )
import GHC.Num ( Num(..) )
withPool act = -- ATTENTION: cut-n-paste from Control.Exception below!
block (do
pool <- newPool
- val <- catchException
+ val <- catchAny
(unblock (act pool))
(\e -> do freePool pool; throw e)
freePool pool